Skip to content

Commit 70aac90

Browse files
authored
Update README.md
1 parent 711694b commit 70aac90

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed

README.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,46 @@ $ fire ./test.js arg1 arg2
1414
```
1515
### Fire third party node_modules
1616

17-
[Example](./examples.md)
17+
> npm install md5
18+
> fire md5 test
19+
> npm install uui
20+
> fire uuid
21+
> npm install open
22+
> fire open http://127.0.0.1
1823
24+
[More Example](./examples.md)
1925

2026
### Fire remote js
21-
2227
> curl https://raw.githubusercontent.com/lwdgit/node-fire/dev/examples/calc.js | fire add 1 2
2328
2429
### Fire local
25-
```
26-
//test.js
27-
module.exports = function(arg1, arg2) {
28-
console.log(arg1, Array.isArray(arg1));
29-
console.log(arg2);
30-
console.log(this.arg3);
31-
console.log(this.arg4);
32-
return 'done';
33-
}
34-
```
35-
RUN
36-
```
37-
fire ./test.js "1,2,3,4" hello --arg3 world --arg4 "the end"
38-
```
39-
Output:
40-
41-
```
42-
[ '1', '2', '3', '4' ] true
43-
hello
44-
world
45-
the end
46-
done
47-
```
4830

49-
Test2
31+
#### Test1
32+
```
33+
//test.js
34+
module.exports = function(arg1, arg2) {
35+
console.log(arg1, Array.isArray(arg1));
36+
console.log(arg2);
37+
console.log(this.arg3);
38+
console.log(this.arg4);
39+
return 'done';
40+
}
41+
```
42+
RUN
43+
```
44+
fire ./test.js "1,2,3,4" hello --arg3 world --arg4 "the end"
45+
```
46+
Output:
47+
48+
```
49+
[ '1', '2', '3', '4' ] true
50+
hello
51+
world
52+
the end
53+
done
54+
```
55+
56+
#### Test2
5057

5158
```javascript
5259
//test2.js
@@ -64,7 +71,7 @@ Output:
6471
hello world!
6572
```
6673

67-
One more:
74+
#### One more
6875

6976
```
7077
//calc.js
@@ -168,6 +175,7 @@ npm run open
168175
## Contribution
169176

170177
[Fork](https://github.com/lwdgit/node-fire#fork-destination-box)
178+
171179
[Issues](https://github.com/lwdgit/node-fire/issues)
172180

173181
## LICENSE

0 commit comments

Comments
 (0)