chore(migrate): apps/* to webpack5 (#9606)

This commit is contained in:
Igor Randjelovic
2021-12-21 18:47:33 +01:00
committed by GitHub
parent 04c0f8783d
commit a88cacab89
62 changed files with 643 additions and 404 deletions

25
tools/scripts/pack-webpack5.mjs Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env zx
import 'zx/globals';
import path from 'path';
const webpack5Path = path.resolve(__dirname, '../../packages/webpack5');
const distPath = path.resolve(__dirname, '../../dist/packages');
const packageJSON = await fs.readJSON(`${webpack5Path}/package.json`);
const tgzName = `nativescript-webpack-${packageJSON.version}.tgz`;
cd(webpack5Path);
await $`npm install`;
await $`npm pack`;
const from = path.join(webpack5Path, tgzName);
const to = path.join(distPath, 'nativescript-webpack.tgz');
await fs.move(from, to, {
overwrite: true,
});
console.log(chalk.green(`@nativescript/webpack has been built and packed.\n`));
console.log(to);