fix(gulpfile): fix the pubbuild task on Windows

Closes #349
This commit is contained in:
Marc Laval 2015-01-05 11:58:13 +01:00 committed by Misko Hevery
parent d3a40e726e
commit 368cc29d48
1 changed files with 1 additions and 7 deletions

View File

@ -14,7 +14,7 @@ module.exports = function(gulp, plugins, config) {
if (!webFolders.length) {
return;
}
var folder = getParentFolder(webFolders.shift());
var folder = path.resolve(path.join(webFolders.shift(), '..'));
var destFolder = path.resolve(path.join(config.dest, path.basename(folder)));
return util.processToPromise(spawn(config.command, ['build', '-o', destFolder], {
stdio: 'inherit',
@ -26,12 +26,6 @@ module.exports = function(gulp, plugins, config) {
};
};
function getParentFolder(folder) {
var parts = folder.split(path.sep);
parts.pop();
return parts.join(path.sep);
}
function replaceDartWithJsScripts(gulp, folder) {
return util.streamToPromise(gulp.src(path.join(folder, '**/*.html'))
.pipe(through2.obj(function(file, enc, done) {