Skip to content

Commit fa46c99

Browse files
committed
Cleanup
1 parent f2caa82 commit fa46c99

File tree

4 files changed

+5
-106
lines changed

4 files changed

+5
-106
lines changed

packages/webchannel-wrapper/.npmignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/webchannel-wrapper/gulpfile.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2020 Google Inc.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -95,7 +95,6 @@ function createBuildTask(filename, prefix, suffix) {
9595

9696
function createRollupTask(inputPath) {
9797
return async function rollupBuild() {
98-
console.log('inputPath', inputPath);
9998
const inputOptions = {
10099
input: inputPath,
101100
plugins: [rollupSourcemaps(), commonjs()]
@@ -125,15 +124,13 @@ const cjsBuild = createBuildTask(
125124
gulp.task('cjs', cjsBuild);
126125

127126
// esm build
127+
// 1) Do closure compile without any wrapping code.
128+
// 2) Use rollup to convert result to ESM format.
129+
// 3) Delete intermediate files.
128130
const intermediateEsmFile = 'temp/esm.js';
129131
const intermediateEsmPath = resolve(__dirname, 'dist/', intermediateEsmFile);
130132
const esmBuild = createBuildTask(intermediateEsmFile, '', '');
131133
const rollupTask = createRollupTask(intermediateEsmPath);
132134
gulp.task('esm', gulp.series(esmBuild, rollupTask, deleteIntermediateFiles));
133135

134-
// Deletes intermediate files.
135-
gulp.task('clean', done =>
136-
del([resolve(__dirname, intermediateEsmFile)], done)
137-
);
138-
139136
gulp.task('default', gulp.parallel('cjs', 'esm'));

packages/webchannel-wrapper/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"scripts": {
1212
"dev": "watch 'yarn build' src",
13-
"build": "node tools/build.js",
13+
"build": "gulp",
1414
"prepare": "yarn build"
1515
},
1616
"license": "Apache-2.0",
@@ -19,7 +19,6 @@
1919
"google-closure-library": "20200224.0.0",
2020
"gulp": "4.0.2",
2121
"gulp-sourcemaps": "2.6.5",
22-
"closure-builder": "2.3.8",
2322
"rollup": "2.0.6",
2423
"rollup-plugin-commonjs": "10.1.0",
2524
"rollup-plugin-sourcemaps": "0.5.0"

packages/webchannel-wrapper/tools/build.js

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)