fix build and clean scripts
This commit is contained in:
parent
48f58feae6
commit
e232332a46
4 changed files with 25 additions and 21 deletions
|
@ -10,9 +10,7 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"rebuild": "pnpm run clean && pnpm -r run build && pnpm run gulp",
|
||||
"build": "pnpm -r run build:cargo && pnpm -r run build:recursive && pnpm run gulp",
|
||||
"build:recursive": "pnpm -r run build",
|
||||
"build:cargo": "pnpm --filter backend run build:cargo",
|
||||
"build": "pnpm -r run build && pnpm run gulp",
|
||||
"start": "pnpm --filter backend run start",
|
||||
"start:test": "pnpm --filter backend run start:test",
|
||||
"init": "pnpm run migrate",
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"artifacts": "napi artifacts",
|
||||
"build": "napi build --features napi --platform --release ./built/",
|
||||
"build:debug": "napi build --platform",
|
||||
"build": "napi build --features napi --platform --release ./built/ && cargo build --locked --release --manifest-path ./migration/Cargo.toml",
|
||||
"build:debug": "napi build --platform ./built/ && cargo build --manifest-path ./migration/Cargo.toml",
|
||||
"prepublishOnly": "napi prepublish -t npm",
|
||||
"test": "pnpm run cargo:test && pnpm run build && ava",
|
||||
"universal": "napi universal",
|
||||
|
|
|
@ -1,26 +1,30 @@
|
|||
const fs = require('fs');
|
||||
const fs = require('node:fs');
|
||||
const execa = require('execa');
|
||||
const { join } = require('node:path');
|
||||
|
||||
(async () => {
|
||||
fs.rmSync(__dirname + '/../packages/backend/built', { recursive: true, force: true });
|
||||
fs.rmSync(__dirname + '/../packages/backend/node_modules', { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/backend/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/backend/node_modules'), { recursive: true, force: true });
|
||||
|
||||
fs.rmSync(__dirname + '/../packages/client/built', { recursive: true, force: true });
|
||||
fs.rmSync(__dirname + '/../packages/client/node_modules', { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/backend/native-utils/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/backend/native-utils/node_modules'), { recursive: true, force: true });
|
||||
|
||||
fs.rmSync(__dirname + '/../packages/sw/built', { recursive: true, force: true });
|
||||
fs.rmSync(__dirname + '/../packages/sw/node_modules', { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/client/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/client/node_modules'), { recursive: true, force: true });
|
||||
|
||||
fs.rmSync(__dirname + '/../built', { recursive: true, force: true });
|
||||
fs.rmSync(__dirname + '/../node_modules', { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/sw/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/sw/node_modules'), { recursive: true, force: true });
|
||||
|
||||
fs.rmSync(join(__dirname, '/../built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../node_modules'), { recursive: true, force: true });
|
||||
|
||||
execa('pnpm', ['store', 'prune'], {
|
||||
cwd: __dirname + '/../',
|
||||
cwd: join(__dirname, '/../'),
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
execa('cargo', ['clean'], {
|
||||
cwd: __dirname + '/../packages/backend/native-utils',
|
||||
cwd: join(__dirname, '/../packages/backend/native-utils'),
|
||||
stdio: 'inherit'
|
||||
});
|
||||
})();
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
const fs = require('fs');
|
||||
const fs = require('node:fs');
|
||||
const { join } = require('node:path');
|
||||
|
||||
(async () => {
|
||||
fs.rmSync(__dirname + '/../packages/backend/built', { recursive: true, force: true });
|
||||
fs.rmSync(__dirname + '/../packages/client/built', { recursive: true, force: true });
|
||||
fs.rmSync(__dirname + '/../packages/sw/built', { recursive: true, force: true });
|
||||
fs.rmSync(__dirname + '/../built', { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/backend/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/backend/native-utils/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/client/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../packages/sw/built'), { recursive: true, force: true });
|
||||
fs.rmSync(join(__dirname, '/../built'), { recursive: true, force: true });
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue