Skip to content

Commit

Permalink
add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Dec 6, 2018
1 parent 71065f9 commit 569d871
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ async function main() {
__dirname + "/../src/loaders/shebang-loader"
);

const { code: terserLoader, assets: terserLoaderAssets } = await ncc(
__dirname + "/../src/loaders/terser-loader"
);

const { code: tsLoader, assets: tsLoaderAssets } = await ncc(
__dirname + "/../src/loaders/ts-loader"
);
Expand All @@ -50,6 +54,7 @@ async function main() {
Object.keys(nodeLoaderAssets).length ||
Object.keys(relocateLoaderAssets).length ||
Object.keys(shebangLoaderAssets).length ||
Object.keys(terserLoaderAssets).length ||
Object.keys(tsLoaderAssets).length ||
Object.keys(sourcemapAssets).length
) {
Expand All @@ -64,6 +69,7 @@ async function main() {
writeFileSync(__dirname + "/../dist/ncc/loaders/node-loader.js", nodeLoader);
writeFileSync(__dirname + "/../dist/ncc/loaders/relocate-loader.js", relocateLoader);
writeFileSync(__dirname + "/../dist/ncc/loaders/shebang-loader.js", shebangLoader);
writeFileSync(__dirname + "/../dist/ncc/loaders/terser-loader.js", terserLoader);
writeFileSync(__dirname + "/../dist/ncc/loaders/ts-loader.js", tsLoader);

// copy webpack buildin
Expand Down

0 comments on commit 569d871

Please sign in to comment.