Skip to content

Commit

Permalink
Use jscs to check index.js and make it happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Mao committed Mar 23, 2015
1 parent 614b69c commit bfb8522
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,38 @@ function Gulp() {
util.inherits(Gulp, Orchestrator);

Gulp.prototype.task = Gulp.prototype.add;
Gulp.prototype.run = function () {
// run() is deprecated as of 3.5 and will be removed in 4.0
// use task dependencies instead
Gulp.prototype.run = function() {
// `run()` is deprecated as of 3.5 and will be removed in 4.0
// Use task dependencies instead

// impose our opinion of "default" tasks onto orchestrator
// Impose our opinion of "default" tasks onto orchestrator
var tasks = arguments.length ? arguments : ['default'];

this.start.apply(this, tasks);
};

Gulp.prototype.src = vfs.src;
Gulp.prototype.dest = vfs.dest;
Gulp.prototype.watch = function (glob, opt, fn) {
Gulp.prototype.watch = function(glob, opt, fn) {
if (typeof opt === 'function' || Array.isArray(opt)) {
fn = opt;
opt = null;
}

// array of tasks given
// Array of tasks given
if (Array.isArray(fn)) {
return vfs.watch(glob, opt, function () {
return vfs.watch(glob, opt, function() {
this.start.apply(this, fn);
}.bind(this));
}

return vfs.watch(glob, opt, fn);
};

// let people use this class from our instance
// Let people use this class from our instance
Gulp.prototype.Gulp = Gulp;

// deprecations
// Deprecations
deprecated.field('gulp.env has been deprecated. ' +
'Use your own CLI parser instead. ' +
'We recommend using yargs or minimist.',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"scripts": {
"prepublish": "marked-man --name gulp docs/CLI.md > gulp.1",
"lint": "jshint lib bin index.js --reporter node_modules/jshint-stylish/stylish.js --exclude node_modules && jscs lib bin test",
"lint": "jshint lib bin index.js --reporter node_modules/jshint-stylish/stylish.js --exclude node_modules && jscs lib bin test index.js",
"test": "npm run-script lint && mocha --reporter spec",
"coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
},
Expand Down

0 comments on commit bfb8522

Please sign in to comment.