Skip to content

Commit

Permalink
Merge pull request #832 from Polymer/fix-wct-gulpfile
Browse files Browse the repository at this point in the history
Update gulpfile.js
  • Loading branch information
keanulee authored Dec 23, 2018
2 parents 5632c9c + e32b035 commit fe1829d
Showing 1 changed file with 36 additions and 32 deletions.
68 changes: 36 additions & 32 deletions packages/web-component-tester/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand All @@ -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',
Expand Down

0 comments on commit fe1829d

Please sign in to comment.