Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test][skip ci] Issue #63 Use test/esm-bundled.rollup.config.js to ge…
…nerate test/lit-bundled/test-name-test-imports.js
- Loading branch information
Showing
17 changed files
with
1,734 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import sizes from 'rollup-plugin-sizes'; | ||
import filesize from 'rollup-plugin-filesize'; | ||
import babel from 'rollup-plugin-babel'; | ||
import minifyPreset from 'babel-preset-minify'; | ||
|
||
export default { | ||
input: 'preprocess4/test-name-test-imports.js', | ||
output: { | ||
file: 'lit-bundled/test-name-test-imports.js', | ||
format: 'esm', | ||
}, | ||
plugins: [ | ||
resolve({ | ||
modulesOnly: true, | ||
}), | ||
babel({ | ||
sourceMaps: false, | ||
comments: false, | ||
plugins: [ | ||
'@babel/plugin-syntax-object-rest-spread', | ||
'@babel/plugin-syntax-async-generators', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-syntax-import-meta', | ||
// rollup rewrites import.meta.url, but makes them point to the file location after bundling | ||
// we want the location before bundling | ||
[ 'bundled-import-meta', { | ||
'mappings': { | ||
'../../': '../../', | ||
'node_modules': '../../../' | ||
}, | ||
'bundleDir': 'preprocess4/', | ||
'importStyle': 'esm', | ||
} ], | ||
], | ||
presets: [ | ||
minifyPreset({}, { | ||
// Options from polymer-build/src/js-transform.ts | ||
// Disable the minify-constant-folding plugin because it has a bug relating | ||
// to invalid substitution of constant values into export specifiers: | ||
// https://github.com/babel/minify/issues/820 | ||
evaluate: false, | ||
|
||
// TODO(aomarks) Find out why we disabled this plugin. | ||
simplifyComparisons: false, | ||
|
||
// Prevent removal of things that babel thinks are unreachable, but sometimes | ||
// gets wrong: https://github.com/Polymer/tools/issues/724 | ||
deadcode: false, | ||
|
||
// Disable the simplify plugin because it can eat some statements preceeding | ||
// loops. https://github.com/babel/minify/issues/824 | ||
simplify: false, | ||
|
||
// This is breaking ES6 output. https://github.com/Polymer/tools/issues/261 | ||
mangle: false, | ||
}), | ||
], | ||
}), | ||
sizes({ | ||
details: true, | ||
}), | ||
filesize({ | ||
showBrotliSize: true, | ||
}), | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -425,6 +425,6 @@ suite('I18nElement with ' + | |
}), | ||
]; | ||
|
||
suitesRunner(suites); | ||
suitesRunner(suites, 100); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,6 @@ suite('I18nElement with ' + | |
}) | ||
]; | ||
|
||
suitesRunner(suites, 3000); | ||
suitesRunner(suites, 500); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,6 @@ suite('I18nElement with ' + | |
}) | ||
]; | ||
|
||
suitesRunner(suites); | ||
suitesRunner(suites, 500); | ||
|
||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
rm -rf lit-bundled | ||
cp -rvf preprocess4 lit-bundled | ||
|
||
for i in minimal basic edge-case multiple-case template-default-lang preference no-persist; do { | ||
echo Building lit-bundled $i; | ||
sed -e "s/test-name/${i}/g" esm-bundled.rollup.config.js >rollup.config.js | ||
../node_modules/.bin/rollup -c rollup.config.js | ||
} done | ||
|
||
rm -vf rollup.config.js |