feat: rspack

This commit is contained in:
Nathan Walker
2025-03-21 16:46:17 -07:00
parent 563118cb0e
commit 490c168571
87 changed files with 28633 additions and 0 deletions

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

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