Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 9f0506d

Browse files
committed
use closure 20171023, with proper ordering
1 parent e2227ce commit 9f0506d

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

gulpfile.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,24 @@ function closurify(sourceName, fileName) {
5757
js_output_file: `${fileName}.js`,
5858
warning_level: 'VERBOSE',
5959
rewrite_polyfills: false,
60+
module_resolution: 'NODE',
6061
externs: [
6162
'externs/webcomponents.js',
6263
'node_modules/@webcomponents/custom-elements/externs/custom-elements.js',
6364
'node_modules/@webcomponents/html-imports/externs/html-imports.js',
6465
'node_modules/@webcomponents/shadycss/externs/shadycss-externs.js',
6566
'node_modules/@webcomponents/shadydom/externs/shadydom.js'
66-
]
67+
],
68+
entry_point: `entrypoints/${sourceName}-index.js`,
69+
dependency_mode: 'STRICT'
6770
};
6871

69-
const rollupOptions = {
70-
entry: `entrypoints/${sourceName}-index.js`,
71-
format: 'iife',
72-
moduleName: 'webcomponents',
73-
sourceMap: true,
74-
context: 'window'
75-
};
76-
77-
return rollup(rollupOptions)
78-
.pipe(source(`${sourceName}-bundle.js`))
79-
.pipe(buffer())
80-
.pipe(sourcemaps.init({loadMaps: true}))
72+
return gulp.src([
73+
'entrypoints/*.js', 'src/*.js',
74+
'node_modules/es6-promise/lib/**/*.js',
75+
'node_modules/@webcomponents/**/*.js',
76+
'!node_modules/@webcomponents/*/externs/*.js'
77+
], {base: './'})
8178
.pipe(closure(closureOptions))
8279
.pipe(sourcemaps.write('.'))
8380
.pipe(gulp.dest('.'));

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"del": "^3.0.0",
3838
"es6-promise": "^4.1.1",
3939
"eslint": "^4.9.0",
40-
"google-closure-compiler": "^20170910.0.0",
40+
"google-closure-compiler": "^20171023.0.1",
4141
"gulp": "^3.8.8",
4242
"gulp-rename": "^1.2.2",
4343
"gulp-sourcemaps": "^2.4.1",

0 commit comments

Comments
 (0)