forked from gulpjs/gulp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Contra
committed
Oct 30, 2013
1 parent
639bbda
commit 1881df4
Showing
4 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ build | |
components | ||
*.orig | ||
.idea | ||
sandbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
node_modules | ||
build | ||
*.node | ||
components | ||
components | ||
sandbox | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
#!/usr/bin/env node | ||
|
||
var gulp = require('../'), | ||
argv = require('optimist').argv, | ||
join = require('path').join, | ||
existsSync = require('fs').existsSync, | ||
tasks = argv._, | ||
gulpFilename = getGulpFile(); | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
|
||
var argv = require('optimist').argv; | ||
|
||
var gulp = require('../'); | ||
var gulpFilename = getGulpFile(); | ||
var tasks = argv._; | ||
|
||
if (!gulpFilename) { | ||
throw new Error("Missing Gulpfile"); | ||
} | ||
|
||
// Expose list of tasks and flags to other tasks | ||
gulp.env = argv; | ||
// Expose CLI flags to tasks or plugins | ||
gulp.env = tasks; | ||
|
||
var theGulpfile = require(gulpFilename); | ||
|
||
gulp.run.apply(gulp, tasks); | ||
|
||
function getGulpFile() { | ||
var Gulpfiles = Object.keys(require.extensions).map(function(ext){ | ||
return join(process.cwd(), "Gulpfile" + ext); | ||
var extensions = Object.keys(require.extensions); | ||
var Gulpfiles = extensions.map(function(ext){ | ||
return path.join(process.cwd(), "Gulpfile" + ext); | ||
}); | ||
|
||
var gulpFiles = Object.keys(require.extensions).map(function(ext){ | ||
return join(process.cwd(), "gulpfile" + ext); | ||
var gulpFiles = extensions.map(function(ext){ | ||
return path.join(process.cwd(), "gulpfile" + ext); | ||
}); | ||
|
||
return gulpFiles.concat(Gulpfiles).filter(function(v){ | ||
return existsSync(v); | ||
})[0]; | ||
return gulpFiles.concat(Gulpfiles) | ||
.filter(fs.existsSync)[0]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name":"gulp", | ||
"description":"The streaming build system", | ||
"version":"1.2.0", | ||
"version":"1.2.1", | ||
"homepage":"http://github.com/wearefractal/gulp", | ||
"repository":"git://github.com/wearefractal/gulp.git", | ||
"author":"Fractal <[email protected]> (http://wearefractal.com/)", | ||
|