From e32b035d5216f37b25df9e46cebdb5c1e0b90887 Mon Sep 17 00:00:00 2001 From: Keanu Lee Date: Sat, 22 Dec 2018 09:28:15 -0800 Subject: [PATCH] Update gulpfile.js --- packages/web-component-tester/gulpfile.js | 68 ++++++++++++----------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/packages/web-component-tester/gulpfile.js b/packages/web-component-tester/gulpfile.js index e6254701a..0415b1db5 100644 --- a/packages/web-component-tester/gulpfile.js +++ b/packages/web-component-tester/gulpfile.js @@ -92,23 +92,25 @@ gulp.task('build:typescript-browser', function() { gulp.task( 'build:browser', - gulp.series(['build:typescript-browser']), - function() { - return rollup.rollup({ - entry: 'browser/index.js', - }) - .then(function(bundle) { - return bundle.write({ - indent: false, - format: 'iife', - banner: fs.readFileSync('browser-js-header.txt', 'utf-8'), - intro: 'window.__wctUseNpm = false;', - dest: 'browser.js', - sourceMap: true, - sourceMapFile: path.resolve('browser.js.map') + gulp.series([ + 'build:typescript-browser', + function() { + return rollup.rollup({ + entry: 'browser/index.js', + }) + .then(function(bundle) { + return bundle.write({ + indent: false, + format: 'iife', + banner: fs.readFileSync('browser-js-header.txt', 'utf-8'), + intro: 'window.__wctUseNpm = false;', + dest: 'browser.js', + sourceMap: true, + sourceMapFile: path.resolve('browser.js.map') + }); }); - }); - }); + } + ])); gulp.task('build:wct-browser-legacy:a11ySuite', function() { return gulp.src(['data/a11ySuite-npm-header.txt', 'data/a11ySuite.js']) @@ -118,23 +120,25 @@ gulp.task('build:wct-browser-legacy:a11ySuite', function() { gulp.task( 'build:wct-browser-legacy:browser', - gulp.series(['build:typescript-browser']), - function() { - return rollup.rollup({ - entry: 'browser/index.js', - }) - .then(function(bundle) { - return bundle.write({ - indent: false, - format: 'iife', - banner: fs.readFileSync('browser-js-header.txt', 'utf-8'), - intro: 'window.__wctUseNpm = true;', - dest: '../wct-browser-legacy/browser.js', - sourceMap: true, - sourceMapFile: path.resolve('browser.js.map') + gulp.series([ + 'build:typescript-browser', + function() { + return rollup.rollup({ + entry: 'browser/index.js', + }) + .then(function(bundle) { + return bundle.write({ + indent: false, + format: 'iife', + banner: fs.readFileSync('browser-js-header.txt', 'utf-8'), + intro: 'window.__wctUseNpm = true;', + dest: '../wct-browser-legacy/browser.js', + sourceMap: true, + sourceMapFile: path.resolve('browser.js.map') + }); }); - }); - }); + } + ])); gulp.task('build:wct-browser-legacy', gulp.series([ 'build:wct-browser-legacy:a11ySuite',