Skip to content

Commit

Permalink
Convert custom elements polyfill to TypeScript.
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Feb 7, 2020
1 parent 0681bc0 commit 98a5a6d
Show file tree
Hide file tree
Showing 28 changed files with 1,207 additions and 1,342 deletions.
2 changes: 1 addition & 1 deletion packages/custom-elements/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gulp.task('default', () => {
language_out: 'ECMASCRIPT5_STRICT',
externs: ['externs/custom-elements.js'],
dependency_mode: 'STRICT',
entry_point: ['/src/custom-elements'],
entry_point: ['/lib/custom-elements'],
js_output_file: 'custom-elements.min.js',
output_wrapper: '(function(){\n%output%\n}).call(self);',
assume_function_wrapper: true,
Expand Down
5 changes: 3 additions & 2 deletions packages/custom-elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
],
"license": "BSD-3-Clause",
"scripts": {
"build": "gulp",
"build": "tsc && gulp",
"debug": "rollup -c",
"test": "wct",
"prepack": "npm run build",
"format": "find src -name \"*.js\" | xargs clang-format --style=file -i"
"format": "find src -name \"*.ts\" | xargs clang-format --style=file -i"
},
"files": [
"custom-elements.min.js*",
Expand All @@ -35,6 +35,7 @@
"@webcomponents/webcomponents-platform": "^1.0.0",
"clang-format": "^1.3.0",
"es6-promise": "4.2.4",
"typescript": "^3.7.3",
"wct-browser-legacy": "^1.0.2"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/custom-elements/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
input: 'src/custom-elements.js',
input: 'lib/custom-elements.js',
output: { file: 'custom-elements.min.js', format: 'iife', sourcemap: true }
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
class AlreadyConstructedMarker {}

export default new AlreadyConstructedMarker();
export type AlreadyConstructedMarkerType = AlreadyConstructedMarker;
Loading

0 comments on commit 98a5a6d

Please sign in to comment.