forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpubget.js
More file actions
30 lines (27 loc) · 753 Bytes
/
pubget.js
File metadata and controls
30 lines (27 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var util = require('./util');
var spawn = require('child_process').spawn;
var path = require('path');
module.exports = {
dir: pubGetDir,
subDir: pubGetSubDir
};
function pubGetDir(gulp, plugins, config) {
return function() {
return util.processToPromise(spawn(config.command, ['get'], {
stdio: 'inherit',
cwd: config.dir
}));
};
};
function pubGetSubDir(gulp, plugins, config) {
return function() {
// We need to execute pubspec serially as otherwise we can get into trouble
// with the pub cache...
return util.forEachSubDirSequential(config.dir, function(subDir) {
return util.processToPromise(spawn(config.command, ['get'], {
stdio: 'inherit',
cwd: subDir
}));
});
};
};