@@ -8,15 +8,17 @@ We provide a command line interface to run [JSPython](https://github.com/jspytho
8
8
npm install -g jspython-cli
9
9
```
10
10
11
- ## Run in terminal
11
+ ## Usage
12
+
13
+ ### Run in terminal
12
14
```
13
15
jspython path/to/jspython/file
14
16
jspython --file path/to/jspython/file
15
17
jspython --file=test.jspy
16
18
17
19
```
18
20
19
- ## Pass parameters to script
21
+ ### Pass parameters to script
20
22
In CLI
21
23
```
22
24
jspython --file=path/to/jspython/file --param1=value --param
@@ -28,17 +30,17 @@ params("param1") == "value" # true
28
30
params(" param" ) == false # true
29
31
```
30
32
31
- ## Run file
33
+ ### Run file
32
34
```
33
35
jspython --file=path/to/jspython/file.jspy
34
36
```
35
37
36
- ## Run file and log into file
38
+ ### Run file and log into file
37
39
```
38
40
jspython --file=path/to/jspython/file.jspy --output=path/to/log.txt
39
41
```
40
42
41
- ## Run specific function from the file
43
+ ### Run specific function from the file
42
44
```
43
45
jspython --file=path/to/jspython/file.jspy --entryFunction=myFunc1
44
46
```
@@ -49,11 +51,11 @@ jspython -f=path/to/jspython/file.jspy -e=myFunc1
49
51
50
52
51
53
52
- ## Run file when you have your source code in a nested folder
54
+ ### Run file when you have your source code in a nested folder
53
55
```
54
56
jspython --file=path/to/jspython/file.jspy --srcRoot=src
55
57
```
56
- In this case it expects package.json and node_modules on the root level
58
+ Normally you would expect package.json and node_modules to be in the root level and all scripts in the ` src ` folder
57
59
58
60
```
59
61
-|- .git
@@ -62,7 +64,7 @@ In this case it expects package.json and node_modules on the root level
62
64
-|- .ws
63
65
-|- node_modules
64
66
-|- src
65
- -|-my_code.jspy
67
+ -|- my_code.jspy
66
68
-|- package.json
67
69
```
68
70
74
76
> jspython -f=my_code.jspy -s=src --param1=some_Value
75
77
76
78
77
- ## Show version
79
+ ### Version info
78
80
79
81
> jspython -v
80
82
0 commit comments