File tree 7 files changed +37
-46
lines changed 7 files changed +37
-46
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ charset = utf-8
7
7
trim_trailing_whitespace = true
8
8
insert_final_newline = true
9
9
10
- [package.json ]
10
+ [{ package.json, * .yml} ]
11
11
indent_style = space
12
12
indent_size = 2
13
-
14
- [* .md ]
15
- trim_trailing_whitespace = false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
sudo : false
2
2
language : node_js
3
3
node_js :
4
- - ' iojs'
4
+ - ' 5'
5
+ - ' 4'
5
6
- ' 0.12'
6
7
- ' 0.10'
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ module.exports = function (grunt) {
21
21
// `this` is scoped to the grunt instance
22
22
if ( version ) {
23
23
return 'echo grunt-shell version: ' + version ;
24
- } else {
25
- return 'echo grunt version: ' + this . version ;
26
24
}
25
+
26
+ return 'echo grunt version: ' + this . version ;
27
27
}
28
28
} ,
29
29
callback : {
Original file line number Diff line number Diff line change 2
2
"name" : " grunt-shell" ,
3
3
"version" : " 1.1.2" ,
4
4
"description" : " Run shell commands" ,
5
+ "license" : " MIT" ,
6
+ "repository" : " sindresorhus/grunt-shell" ,
7
+ "author" : {
8
+ "name" : " Sindre Sorhus" ,
9
+
10
+ "url" : " sindresorhus.com"
11
+ },
12
+ "engines" : {
13
+ "node" : " >=0.10.0"
14
+ },
15
+ "scripts" : {
16
+ "test" : " xo && grunt"
17
+ },
18
+ "files" : [
19
+ " index.js"
20
+ ],
5
21
"keywords" : [
6
22
" gruntplugin" ,
7
23
" shell" ,
8
24
" command" ,
9
25
" cmd" ,
10
26
" exec" ,
11
27
" spawn" ,
28
+ " child" ,
12
29
" process" ,
13
30
" cli"
14
31
],
15
- "license" : " MIT" ,
16
- "author" : {
17
- "name" : " Sindre Sorhus" ,
18
-
19
- "url" : " http://sindresorhus.com"
20
- },
21
- "files" : [
22
- " tasks"
23
- ],
24
- "repository" : " sindresorhus/grunt-shell" ,
25
- "scripts" : {
26
- "test" : " grunt"
27
- },
28
32
"dependencies" : {
29
33
"chalk" : " ^1.0.0"
30
34
},
31
35
"devDependencies" : {
32
36
"grunt" : " ^0.4.5" ,
33
- "grunt-cli" : " ^0.1.13"
37
+ "grunt-cli" : " ^0.1.13" ,
38
+ "xo" : " *"
34
39
},
35
- "engines " : {
36
- "node " : " >=0.10.0 "
40
+ "peerDependencies " : {
41
+ "grunt " : " >=0.4 "
37
42
}
38
43
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ A good way to interact with other CLI tools. E.g. compiling Compass `compass com
9
9
10
10
## Install
11
11
12
- ``` sh
12
+ ```
13
13
$ npm install --save-dev grunt-shell
14
14
```
15
15
@@ -27,8 +27,7 @@ grunt.initConfig({
27
27
target: {
28
28
command: ' ls'
29
29
},
30
- // or directly with a string when no extra options are required
31
- another: ' ls ./src'
30
+ another: ' ls ./src' // shorthand
32
31
}
33
32
});
34
33
@@ -176,7 +175,7 @@ grunt.initConfig({
176
175
177
176
### command
178
177
179
- * Required*
178
+ * Required* < br >
180
179
Type: ` string ` , ` function `
181
180
182
181
The command you want to run or a function which returns it. Supports underscore templates.
@@ -187,35 +186,35 @@ The command you want to run or a function which returns it. Supports underscore
187
186
188
187
### stdout
189
188
190
- Type: ` boolean `
189
+ Type: ` boolean ` < br >
191
190
Default: ` true `
192
191
193
192
Show stdout in the Terminal.
194
193
195
194
### stderr
196
195
197
- Type: ` boolean `
196
+ Type: ` boolean ` < br >
198
197
Default: ` true `
199
198
200
199
Show stderr in the Terminal.
201
200
202
201
### stdin
203
202
204
- Type: ` boolean `
203
+ Type: ` boolean ` < br >
205
204
Default: ` true `
206
205
207
206
Forward the terminal's stdin to the command.
208
207
209
208
### failOnError
210
209
211
- Type: ` boolean `
210
+ Type: ` boolean ` < br >
212
211
Default: ` true `
213
212
214
213
Fail task if it encounters an error. Does not apply if you specify a ` callback ` .
215
214
216
215
### stdinRawMode
217
216
218
- Type: ` boolean `
217
+ Type: ` boolean ` < br >
219
218
Default: ` false `
220
219
221
220
This sets ` stdin ` to [ act as a raw device] ( http://nodejs.org/api/tty.html#tty_rs_setrawmode_mode ) .
@@ -245,4 +244,4 @@ Specify some options to be passed to the [.exec()](http://nodejs.org/api/child_p
245
244
246
245
## License
247
246
248
- MIT © [ Sindre Sorhus] ( http ://sindresorhus.com)
247
+ MIT © [ Sindre Sorhus] ( https ://sindresorhus.com)
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ module.exports = function (grunt) {
12
12
failOnError : true ,
13
13
stdinRawMode : false
14
14
} ) ;
15
+
15
16
var cmd = typeof this . data === 'string' ? this . data : this . data . command ;
17
+
16
18
if ( cmd === undefined ) {
17
19
throw new Error ( '`command` required' ) ;
18
20
}
You can’t perform that action at this time.
0 commit comments