fix(Tools): Moves files out of dart2js/**/web.
Fixes bug that only allowed src and packages to be moved out of dart2js/**/web. Globs all files in dart2js/**/web and moves them one directory up.
This commit is contained in:
parent
1d24e2cf23
commit
40150379ae
|
@ -19,6 +19,7 @@ module.exports = function(gulp, plugins, config) {
|
|||
var destFolder = path.resolve(path.join(config.dest, path.basename(folder)));
|
||||
var pubMode = config.mode || 'release';
|
||||
var pubArgs = ['build', '--mode', pubMode, '-o', destFolder];
|
||||
|
||||
return util.processToPromise(spawn(config.command, pubArgs, {
|
||||
stdio: 'inherit',
|
||||
cwd: folder
|
||||
|
@ -45,8 +46,10 @@ function replaceDartWithJsScripts(gulp, folder) {
|
|||
}
|
||||
|
||||
function removeWebFolder(gulp, folder) {
|
||||
fs.renameSync(path.join(folder, 'web', 'src'), path.join(folder, 'src'));
|
||||
fs.renameSync(path.join(folder, 'web', 'packages'), path.join(folder, 'packages'));
|
||||
var folders = [].slice.call(glob.sync(path.join(folder, 'web', '*')));
|
||||
folders.forEach(function(subFolder) {
|
||||
fs.renameSync(subFolder, subFolder.replace(path.sep + 'web' + path.sep, path.sep));
|
||||
});
|
||||
fs.rmdirSync(path.join(folder, 'web'));
|
||||
return Q.resolve();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue