Skip to content

Commit a933620

Browse files
committed
tweaks
1 parent 7829d57 commit a933620

File tree

7 files changed

+37
-46
lines changed

7 files changed

+37
-46
lines changed

.editorconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99

10-
[package.json]
10+
[{package.json,*.yml}]
1111
indent_style = space
1212
indent_size = 2
13-
14-
[*.md]
15-
trim_trailing_whitespace = false

.jshintrc

Lines changed: 0 additions & 13 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- 'iojs'
4+
- '5'
5+
- '4'
56
- '0.12'
67
- '0.10'

Gruntfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ module.exports = function (grunt) {
2121
// `this` is scoped to the grunt instance
2222
if (version) {
2323
return 'echo grunt-shell version: ' + version;
24-
} else {
25-
return 'echo grunt version: ' + this.version;
2624
}
25+
26+
return 'echo grunt version: ' + this.version;
2727
}
2828
},
2929
callback: {

package.json

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,42 @@
22
"name": "grunt-shell",
33
"version": "1.1.2",
44
"description": "Run shell commands",
5+
"license": "MIT",
6+
"repository": "sindresorhus/grunt-shell",
7+
"author": {
8+
"name": "Sindre Sorhus",
9+
"email": "[email protected]",
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+
],
521
"keywords": [
622
"gruntplugin",
723
"shell",
824
"command",
925
"cmd",
1026
"exec",
1127
"spawn",
28+
"child",
1229
"process",
1330
"cli"
1431
],
15-
"license": "MIT",
16-
"author": {
17-
"name": "Sindre Sorhus",
18-
"email": "[email protected]",
19-
"url": "http://sindresorhus.com"
20-
},
21-
"files": [
22-
"tasks"
23-
],
24-
"repository": "sindresorhus/grunt-shell",
25-
"scripts": {
26-
"test": "grunt"
27-
},
2832
"dependencies": {
2933
"chalk": "^1.0.0"
3034
},
3135
"devDependencies": {
3236
"grunt": "^0.4.5",
33-
"grunt-cli": "^0.1.13"
37+
"grunt-cli": "^0.1.13",
38+
"xo": "*"
3439
},
35-
"engines": {
36-
"node": ">=0.10.0"
40+
"peerDependencies": {
41+
"grunt": ">=0.4"
3742
}
3843
}

readme.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A good way to interact with other CLI tools. E.g. compiling Compass `compass com
99

1010
## Install
1111

12-
```sh
12+
```
1313
$ npm install --save-dev grunt-shell
1414
```
1515

@@ -27,8 +27,7 @@ grunt.initConfig({
2727
target: {
2828
command: 'ls'
2929
},
30-
// or directly with a string when no extra options are required
31-
another: 'ls ./src'
30+
another: 'ls ./src' // shorthand
3231
}
3332
});
3433

@@ -176,7 +175,7 @@ grunt.initConfig({
176175

177176
### command
178177

179-
*Required*
178+
*Required*<br>
180179
Type: `string`, `function`
181180

182181
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
187186

188187
### stdout
189188

190-
Type: `boolean`
189+
Type: `boolean`<br>
191190
Default: `true`
192191

193192
Show stdout in the Terminal.
194193

195194
### stderr
196195

197-
Type: `boolean`
196+
Type: `boolean`<br>
198197
Default: `true`
199198

200199
Show stderr in the Terminal.
201200

202201
### stdin
203202

204-
Type: `boolean`
203+
Type: `boolean`<br>
205204
Default: `true`
206205

207206
Forward the terminal's stdin to the command.
208207

209208
### failOnError
210209

211-
Type: `boolean`
210+
Type: `boolean`<br>
212211
Default: `true`
213212

214213
Fail task if it encounters an error. Does not apply if you specify a `callback`.
215214

216215
### stdinRawMode
217216

218-
Type: `boolean`
217+
Type: `boolean`<br>
219218
Default: `false`
220219

221220
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
245244

246245
## License
247246

248-
MIT © [Sindre Sorhus](http://sindresorhus.com)
247+
MIT © [Sindre Sorhus](https://sindresorhus.com)

tasks/shell.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ module.exports = function (grunt) {
1212
failOnError: true,
1313
stdinRawMode: false
1414
});
15+
1516
var cmd = typeof this.data === 'string' ? this.data : this.data.command;
17+
1618
if (cmd === undefined) {
1719
throw new Error('`command` required');
1820
}

0 commit comments

Comments
 (0)