diff --git a/packages/scoped-custom-element-registry/closure-flags.txt b/packages/scoped-custom-element-registry/closure-flags.txt new file mode 100644 index 000000000..2bb774eda --- /dev/null +++ b/packages/scoped-custom-element-registry/closure-flags.txt @@ -0,0 +1,17 @@ +--compilation_level=ADVANCED_OPTIMIZATIONS +--warning_level=VERBOSE +--language_in=STABLE +--language_out=ECMASCRIPT5_STRICT +--dependency_mode=PRUNE +--entry_point=./src/scoped-custom-element-registry.js +--js=./src/scoped-custom-element-registry.js +--js_output_file=./scoped-custom-element-registry.min.js +--output_wrapper="(function(){ +%output% +}).call(typeof globalThis === 'object' ? globalThis : window); + +//# sourceMappingURL=scoped-custom-element-registry.min.js.map" +--assume_function_wrapper=true +--rewrite_polyfills=false +--create_source_map=./scoped-custom-element-registry.min.js.map +--source_map_include_content diff --git a/packages/scoped-custom-element-registry/gulpfile.js b/packages/scoped-custom-element-registry/gulpfile.js deleted file mode 100644 index 8f1361b5d..000000000 --- a/packages/scoped-custom-element-registry/gulpfile.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @license - * Copyright (c) 2021 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'; - -const compilerPackage = require('google-closure-compiler'); -const gulp = require('gulp'); -const sourcemaps = require('gulp-sourcemaps'); - -const closureCompiler = compilerPackage.gulp(); - -gulp.task('default', () => { - return gulp - .src('./src/**/*.js', {base: './'}) - .pipe(sourcemaps.init()) - .pipe( - closureCompiler({ - compilation_level: 'ADVANCED', - warning_level: 'VERBOSE', - language_in: 'STABLE', - language_out: 'ECMASCRIPT5_STRICT', - dependency_mode: 'PRUNE', - entry_point: ['/src/scoped-custom-element-registry.js'], - js_output_file: 'scoped-custom-element-registry.min.js', - output_wrapper: - "(function(){\n%output%\n}).call(typeof globalThis === 'object' ? globalThis : window);", - assume_function_wrapper: true, - rewrite_polyfills: false, - }) - ) - .pipe(sourcemaps.write('/')) - .pipe(gulp.dest('./')); -}); diff --git a/packages/scoped-custom-element-registry/package.json b/packages/scoped-custom-element-registry/package.json index 72710d5ac..491826f07 100644 --- a/packages/scoped-custom-element-registry/package.json +++ b/packages/scoped-custom-element-registry/package.json @@ -47,9 +47,14 @@ }, "wireit": { "build": { - "command": "gulp", + "dependencies": [ + "build:closure" + ] + }, + "build:closure": { + "command": "google-closure-compiler --flagfile closure-flags.txt", "files": [ - "gulpfile.js", + "closure-flags.txt", "src/**/*.js" ], "output": [