Skip to content

Commit 1881df4

Browse files
author
Contra
committed
style changes to bin
1 parent 639bbda commit 1881df4

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build
66
components
77
*.orig
88
.idea
9+
sandbox

.npmignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
node_modules
44
build
55
*.node
6-
components
6+
components
7+
sandbox
8+
.idea

bin/gulp

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
#!/usr/bin/env node
22

3-
var gulp = require('../'),
4-
argv = require('optimist').argv,
5-
join = require('path').join,
6-
existsSync = require('fs').existsSync,
7-
tasks = argv._,
8-
gulpFilename = getGulpFile();
3+
var path = require('path');
4+
var fs = require('fs');
5+
6+
var argv = require('optimist').argv;
7+
8+
var gulp = require('../');
9+
var gulpFilename = getGulpFile();
10+
var tasks = argv._;
911

1012
if (!gulpFilename) {
1113
throw new Error("Missing Gulpfile");
1214
}
1315

14-
// Expose list of tasks and flags to other tasks
15-
gulp.env = argv;
16+
// Expose CLI flags to tasks or plugins
17+
gulp.env = tasks;
1618

1719
var theGulpfile = require(gulpFilename);
1820

1921
gulp.run.apply(gulp, tasks);
2022

2123
function getGulpFile() {
22-
var Gulpfiles = Object.keys(require.extensions).map(function(ext){
23-
return join(process.cwd(), "Gulpfile" + ext);
24+
var extensions = Object.keys(require.extensions);
25+
var Gulpfiles = extensions.map(function(ext){
26+
return path.join(process.cwd(), "Gulpfile" + ext);
2427
});
2528

26-
var gulpFiles = Object.keys(require.extensions).map(function(ext){
27-
return join(process.cwd(), "gulpfile" + ext);
29+
var gulpFiles = extensions.map(function(ext){
30+
return path.join(process.cwd(), "gulpfile" + ext);
2831
});
2932

30-
return gulpFiles.concat(Gulpfiles).filter(function(v){
31-
return existsSync(v);
32-
})[0];
33+
return gulpFiles.concat(Gulpfiles)
34+
.filter(fs.existsSync)[0];
3335
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name":"gulp",
33
"description":"The streaming build system",
4-
"version":"1.2.0",
4+
"version":"1.2.1",
55
"homepage":"http://github.com/wearefractal/gulp",
66
"repository":"git://github.com/wearefractal/gulp.git",
77
"author":"Fractal <[email protected]> (http://wearefractal.com/)",

0 commit comments

Comments
 (0)