Skip to content

Commit

Permalink
Rename the bin option to binary
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 13, 2019
1 parent 0945b56 commit 923f675
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,47 +35,47 @@ module.exports = grunt => {
port: 8008,
hostname: '0.0.0.0',
base: 'test/200',
bin: 'php'
binary: 'php'
}
},
test301: {
options: {
port: 8009,
hostname: '0.0.0.0',
base: 'test/301',
bin: 'php'
binary: 'php'
}
},
test400: {
options: {
port: 8010,
hostname: '0.0.0.0',
base: 'test/400',
bin: 'php'
binary: 'php'
}
},
test404: {
options: {
port: 8011,
hostname: '0.0.0.0',
base: 'test/404',
bin: 'php'
binary: 'php'
}
},
test500: {
options: {
port: 8020,
hostname: '0.0.0.0',
base: 'test/500',
bin: 'php'
binary: 'php'
}
},
testEnv: {
options: {
port: 8021,
hostname: '0.0.0.0',
base: 'test/env',
bin: 'php',
binary: 'php',
env: {
FOOBAR: 'foobar'
}
Expand All @@ -86,7 +86,7 @@ module.exports = grunt => {
port: 8022,
hostname: '0.0.0.0',
base: 'test/directives',
bin: 'php',
binary: 'php',
directives: {
'error_log': 'foobar'
}
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ This option can also be enabled ad-hoc by running the task like `grunt php:targe

### open

Type: `boolean | string`
Type: `boolean | string`<br>
Default: `false`

Open a browser when task is triggered.
Expand All @@ -181,7 +181,7 @@ Can be one of the following:

### router

Type: `string`<br>
Type: `string`

Optionally specify the path to a [router script](http://php.net/manual/en/features.commandline.webserver.php#example-380) that is run at the start of each HTTP request. If this script returns `false`, then the requested resource is returned as-is. Otherwise the script's output is returned to the browser.

Expand All @@ -198,7 +198,7 @@ if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) {
?>
```

### bin
### binary

Type: `string`<br>
Default: `'php'`
Expand Down
6 changes: 3 additions & 3 deletions tasks/php.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = grunt => {
base: '.',
keepalive: false,
open: false,
bin: 'php',
binary: 'php',
silent: false,
env: {},
directives: {}
Expand Down Expand Up @@ -92,9 +92,9 @@ module.exports = grunt => {
spawnArguments.push(options.router);
}

await binVersionCheck(options.bin, '>=5.4');
await binVersionCheck(options.binary, '>=5.4');

const cp = spawn(options.bin, spawnArguments, {
const cp = spawn(options.binary, spawnArguments, {
stdio: options.silent ? 'ignore' : 'inherit',
env: {
...process.env,
Expand Down

0 comments on commit 923f675

Please sign in to comment.