remove webcomponents-none, only load scopingshim when needed

This commit is contained in:
Daniel Freedman
2017-02-16 12:21:24 -08:00
parent b1802c1255
commit 0dbc9e7536
9 changed files with 20 additions and 50 deletions

View File

@@ -17,9 +17,5 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
import '../bower_components/html-imports/src/html-imports.js'
import '../bower_components/custom-elements/custom-elements.min.js'
// TODO(notwaldorf): Remove after this is addressed:
// https://github.com/webcomponents/shadycss/issues/46
import '../bower_components/shadycss/entrypoints/scoping-shim.js'
import '../src/post-polyfill.js'
import '../src/unresolved.js'

View File

@@ -16,9 +16,5 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
import '../bower_components/html-imports/src/html-imports.js'
// TODO(notwaldorf): Remove after this is addressed:
// https://github.com/webcomponents/shadycss/issues/46
import '../bower_components/shadycss/entrypoints/scoping-shim.js'
import '../src/post-polyfill.js'
import '../src/unresolved.js'

View File

@@ -1,21 +0,0 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/*
* Polyfills loaded: None
* Used in: Chrome
*/
// TODO: This needs to not exist at all.
// TODO(notwaldorf): Remove after this is addressed:
// https://github.com/webcomponents/shadycss/issues/46
import '../bower_components/shadycss/entrypoints/scoping-shim.js'

View File

@@ -63,10 +63,6 @@ function minify(sourceName, fileName, needsContext) {
.pipe(gulp.dest('./'))
}
gulp.task('minify-none', () => {
return minify('webcomponents-none')
});
gulp.task('minify-hi', () => {
return minify('webcomponents-hi')
});
@@ -100,4 +96,4 @@ gulp.task('default', (cb) => {
runseq('refresh-bower', 'build', cb);
});
gulp.task('build', ['minify-none', 'minify-hi', 'minify-hi-ce', 'minify-hi-sd-ce', 'minify-hi-sd-ce-pf', 'minify-sd-ce']);
gulp.task('build', ['minify-hi', 'minify-hi-ce', 'minify-hi-sd-ce', 'minify-hi-sd-ce-pf', 'minify-sd-ce']);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -27,9 +27,7 @@
// TODO(notwaldorf): This is a temporary hack because Chrome still needs to
// load some things for now. Addressing this is blocked on
// https://github.com/webcomponents/shadycss/issues/46.
if (!polyfills.length) {
polyfills.push('none');
} else if (polyfills.length === 4) { // hi-ce-sd-pf is actually called lite.
if (polyfills.length === 4) { // hi-ce-sd-pf is actually called lite.
polyfills = ['lite'];
}
@@ -43,12 +41,9 @@
document.head.appendChild(newScript);
}
// Ensure `WebComponentsReady` is fired also when there are no polyfills loaded.
// TODO(valdrin): only check for `!polyfills.length` once 'none' bundle
// is removed. Addressing this is blocked on
// https://github.com/webcomponents/shadycss/issues/46.
if (polyfills[0] === 'none') {
if (!polyfills.length) {
requestAnimationFrame(function() {
window.dispatchEvent(new CustomEvent('WebComponentsReady'));
});
}
})();
})();