Skip to content

Commit 8a64b3d

Browse files
authored
Merge pull request #385 from webcomponents/platform-entrypoint
Add new entrypoints to webcomponentsjs for the 'platform' polyfills.
2 parents 8b40e81 + 190bb25 commit 8a64b3d

File tree

10 files changed

+64
-11
lines changed

10 files changed

+64
-11
lines changed

packages/webcomponentsjs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
custom-elements-es5-adapter.js
22
webcomponents-bundle.js*
33
bundles/**/*
4+
src/flag-parser.*
45
src/platform/
6+
src/unresolved.*
57
/buildcache

packages/webcomponentsjs/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic
77
Versioning](https://semver.org/spec/v2.0.0.html).
88

9-
<!-- ## [Unreleased] -->
9+
## [Unreleased]
10+
11+
- Add new entrypoints to webcomponentsjs for the 'platform' polyfills.
12+
([#385](https://github.com/webcomponents/polyfills/pull/385))
1013

1114
## [2.4.4] - 2020-07-20
1215

packages/webcomponentsjs/gulpfile.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,20 @@ function closurify(sourceName, fileName) {
104104
.pipe(gulp.dest(outDir));
105105
}
106106

107+
gulp.task('debugify-pf_js', () => {
108+
const rollupOptions = {
109+
plugins: [commonjs()]
110+
};
111+
return debugify('webcomponents-pf_js', null, rollupOptions)
112+
});
113+
114+
gulp.task('debugify-pf_dom', () => {
115+
const rollupOptions = {
116+
plugins: [commonjs()]
117+
};
118+
return debugify('webcomponents-pf_dom', null, rollupOptions)
119+
});
120+
107121
gulp.task('debugify-ce', () => {
108122
return debugify('webcomponents-ce')
109123
});
@@ -130,6 +144,14 @@ gulp.task('debugify-bundle', () => {
130144
return debugify('webcomponents-bundle', 'webcomponents-bundle', rollupOptions);
131145
})
132146

147+
gulp.task('closurify-pf_js', () => {
148+
return closurify('webcomponents-pf_js')
149+
});
150+
151+
gulp.task('closurify-pf_dom', () => {
152+
return closurify('webcomponents-pf_dom')
153+
});
154+
133155
gulp.task('closurify-ce', () => {
134156
return closurify('webcomponents-ce')
135157
});
@@ -177,6 +199,8 @@ gulp.task('clean', () => {
177199
});
178200

179201
gulp.task('debug', gulp.series([
202+
'debugify-pf_js',
203+
'debugify-pf_dom',
180204
'debugify-ce',
181205
'debugify-sd',
182206
'debugify-sd-ce',
@@ -186,6 +210,8 @@ gulp.task('debug', gulp.series([
186210
]));
187211

188212
gulp.task('closure', gulp.series([
213+
'closurify-pf_js',
214+
'closurify-pf_dom',
189215
'closurify-ce',
190216
'closurify-sd',
191217
'closurify-sd-ce',

packages/webcomponentsjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
},
4343
"files": [
4444
"bundles/**/*",
45-
"src/entrypoints/**/*",
4645
"custom-elements-es5-adapter.js",
46+
"src/**/*.js",
4747
"webcomponents-bundle.js*",
4848
"webcomponents-loader.js"
4949
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
@license
3+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
4+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7+
Code distributed by Google as part of the polymer project is also
8+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9+
*/
10+
11+
import '../platform/custom-event.js';
12+
import '../platform/baseuri.js';
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
@license
3+
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
4+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7+
Code distributed by Google as part of the polymer project is also
8+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9+
*/
10+
11+
import '../platform/es6-misc.js';
12+
import '../platform/promise.js';
13+
import '../platform/symbol.js';

packages/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1414
* Used in: IE 11
1515
*/
1616

17-
import '../platform/es6-misc.js';
18-
import '../platform/custom-event.js';
17+
import './webcomponents-pf_js-index.js';
18+
import './webcomponents-pf_dom-index.js';
19+
import '../unresolved.js';
20+
import '../flag-parser.js';
1921
import '../../node_modules/@webcomponents/template/template.js';
20-
import '../platform/promise.js';
21-
import '../platform/symbol.js';
22-
import '../platform/flag-parser.js';
2322
import '../../node_modules/@webcomponents/shadydom/src/shadydom.js';
2423
import '../../node_modules/@webcomponents/custom-elements/src/custom-elements.js';
2524
import '../../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js';
2625
import '../../node_modules/@webcomponents/url/url.js';
27-
import '../platform/baseuri.js';
28-
import '../platform/unresolved.js';

packages/webcomponentsjs/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"module": "esnext",
77
"declaration": true,
88
"sourceMap": true,
9-
"outDir": "./src/platform",
9+
"outDir": "./src",
1010
"importHelpers": true,
1111
"strict": true,
1212
"noImplicitAny": true,
@@ -23,6 +23,6 @@
2323
"moduleResolution": "node"
2424
},
2525
"include": [
26-
"ts_src/platform"
26+
"ts_src"
2727
]
2828
}

0 commit comments

Comments
 (0)