You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
526 B
TypeScript
20 lines
526 B
TypeScript
#!/usr/bin/env zx
|
|
import { fileURLToPath } from 'url';
|
|
import { echo, path, fs, $ } from "zx";
|
|
|
|
echo("开始构建 development ...");
|
|
echo("当前所在的目录是:", process.cwd());
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const root = path.resolve(__dirname, "..");
|
|
const main = path.resolve(root, "packages/main");
|
|
const app = path.resolve(main, "app");
|
|
|
|
if (!fs.existsSync(path.resolve(app, "plugin"))) {
|
|
await $`npm run build:plugin`;
|
|
}
|
|
|
|
await $`npm run types`;
|