Skip to content

Commit

Permalink
Recommend yargs over optimist
Browse files Browse the repository at this point in the history
Substack has deprecated the `optimist` package, recommending the use of
it's successor, `yargs`.
  • Loading branch information
terinjokes committed Mar 3, 2014
1 parent 77344fd commit 42c8a73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ Type: `String`
The path to the file that triggered the event.


[node-optimist]: https://github.com/substack/node-optimist
[node-glob documentation]: https://github.com/isaacs/node-glob#options
[node-glob]: https://github.com/isaacs/node-glob
[glob-stream]: https://github.com/wearefractal/glob-stream
Expand Down
4 changes: 2 additions & 2 deletions docs/recipes/pass-params-from-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
`gulpfile.js`

```js
// npm install gulp optimist gulp-if gulp-uglify
var args = require('optimist').argv;
// npm install gulp yargs gulp-if gulp-uglify
var args = require('yargs').argv;
var gulp = require('gulp');
var gulpif = require('gulp-if');
var uglify = require('gulp-uglify');
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Gulp.prototype.watch = function (glob, opt, fn) {
Gulp.prototype.Gulp = Gulp;

// deprecations
deprecated.field('gulp.env has been deprecated. Use your own CLI parser instead. We recommend using optimist or minimist.', console.log, Gulp.prototype, 'env', gutil.env);
deprecated.field('gulp.env has been deprecated. Use your own CLI parser instead. We recommend using yargs or minimist.', console.log, Gulp.prototype, 'env', gutil.env);
Gulp.prototype.run = deprecated.method('gulp.run() has been deprecated. Use task dependencies or gulp.watch task triggering instead.', console.log, Gulp.prototype.run);

var inst = new Gulp();
Expand Down

0 comments on commit 42c8a73

Please sign in to comment.