install gulp to process code
This commit is contained in:
parent
24f6606c2c
commit
b6a3900ee2
1651 changed files with 253427 additions and 39 deletions
27
node_modules/undertaker/lib/helpers/buildTree.js
generated
vendored
Normal file
27
node_modules/undertaker/lib/helpers/buildTree.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var metadata = require('./metadata');
|
||||
|
||||
function buildTree(tasks) {
|
||||
return Object.values(tasks).map(function(task) {
|
||||
var meta = metadata.get(task);
|
||||
if (meta) {
|
||||
return meta.tree;
|
||||
}
|
||||
|
||||
var name = task.displayName || task.name || '<anonymous>';
|
||||
meta = {
|
||||
name: name,
|
||||
tree: {
|
||||
label: name,
|
||||
type: 'function',
|
||||
nodes: [],
|
||||
},
|
||||
};
|
||||
|
||||
metadata.set(task, meta);
|
||||
return meta.tree;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = buildTree;
|
||||
Loading…
Add table
Add a link
Reference in a new issue