-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: Add --depth flag to pair with --tasks flag
- Loading branch information
Showing
15 changed files
with
313 additions
and
58 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
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
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
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
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,14 +1,19 @@ | ||
'use strict'; | ||
|
||
module.exports = function(tasks) { | ||
return Object.keys(tasks) | ||
.reduce(function(prev, task) { | ||
prev.nodes.push({ | ||
label: task, | ||
nodes: tasks[task].dep, | ||
}); | ||
return prev; | ||
}, { | ||
nodes: [], | ||
var map = {}; | ||
var arr = []; | ||
Object.keys(tasks).forEach(function(taskname) { | ||
var task = { label: taskname, nodes: [], }; | ||
map[taskname] = task; | ||
arr.push(task); | ||
}); | ||
Object.keys(tasks).forEach(function(taskname) { | ||
var task = map[taskname]; | ||
tasks[taskname].dep.forEach(function(childname) { | ||
var child = map[childname] || { label: childname, nodes: [], }; | ||
task.nodes.push(child); | ||
}); | ||
}); | ||
return { label: 'Tasks', nodes: arr, }; | ||
}; |
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
gulp-cli/test | ||
├─┬ build Build all the things! | ||
│ │ --dev …un-minified | ||
│ │ --production …compressed into single bundle | ||
│ └─┬ <series> | ||
│ ├── clean | ||
│ ├── scripts | ||
│ └── styles | ||
├── clean Delete dist folder | ||
├─┬ default Build and watch for changes | ||
│ └─┬ <series> | ||
│ ├─┬ build | ||
│ │ └─┬ <series> | ||
│ │ ├── clean | ||
│ │ ├── scripts | ||
│ │ └── styles | ||
│ └── watch | ||
├── scripts Bundles JavaScript | ||
├── serve Serves files reloading | ||
│ --lr …with live reloading | ||
├── styles Compiles and bundles CSS | ||
└── watch Watch files and build on change |
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
Oops, something went wrong.