From 368cc29d480d5dd0a4cf624ab5cf314042487441 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Mon, 5 Jan 2015 11:58:13 +0100 Subject: [PATCH] fix(gulpfile): fix the pubbuild task on Windows Closes #349 --- tools/build/pubbuild.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/build/pubbuild.js b/tools/build/pubbuild.js index ac51f1e658..5f72dbaec6 100644 --- a/tools/build/pubbuild.js +++ b/tools/build/pubbuild.js @@ -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) {