fix: make clean/dev commands work
This commit is contained in:
parent
712fab5b45
commit
beca3eac55
4 changed files with 25 additions and 16 deletions
|
@ -18,14 +18,14 @@
|
|||
"migrateandstart": "pnpm run migrate && pnpm run start",
|
||||
"gulp": "gulp build",
|
||||
"watch": "pnpm run dev",
|
||||
"dev": "pnpm node ./scripts/dev.js",
|
||||
"dev": "pnpm node ./scripts/dev.mjs",
|
||||
"dev:staging": "NODE_OPTIONS=--max_old_space_size=3072 NODE_ENV=development pnpm run build && pnpm run start",
|
||||
"lint": "pnpm -r --parallel run lint",
|
||||
"debug": "pnpm run build:debug && pnpm run start",
|
||||
"build:debug": "pnpm -r --parallel run build:debug && pnpm run gulp",
|
||||
"format": "pnpm -r --parallel run format",
|
||||
"clean": "pnpm node ./scripts/clean.js",
|
||||
"clean-all": "pnpm node ./scripts/clean-all.js",
|
||||
"clean": "pnpm node ./scripts/clean.mjs",
|
||||
"clean-all": "pnpm node ./scripts/clean-all.mjs",
|
||||
"cleanall": "pnpm run clean-all"
|
||||
},
|
||||
"resolutions": {
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
const fs = require("node:fs");
|
||||
const execa = require("execa");
|
||||
const { join } = require("node:path");
|
||||
import fs from "node:fs";
|
||||
import path, { join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { execa } from "execa";
|
||||
|
||||
(async () => {
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
fs.rmSync(join(__dirname, "/../packages/backend/built"), {
|
||||
recursive: true,
|
||||
force: true,
|
|
@ -1,8 +1,10 @@
|
|||
const fs = require("node:fs");
|
||||
const execa = require("execa");
|
||||
const { join } = require("node:path");
|
||||
import fs from "node:fs";
|
||||
import path, { join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
(async () => {
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
fs.rmSync(join(__dirname, "/../packages/backend/built"), {
|
||||
recursive: true,
|
||||
force: true,
|
|
@ -1,32 +1,36 @@
|
|||
const execa = require("execa");
|
||||
import path, { join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { execa } from "execa";
|
||||
|
||||
(async () => {
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
await execa("pnpm", ["clean"], {
|
||||
cwd: __dirname + "/../",
|
||||
cwd: join(__dirname, "/../"),
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
|
||||
execa("pnpm", ["dlx", "gulp", "watch"], {
|
||||
cwd: __dirname + "/../",
|
||||
cwd: join(__dirname, "/../"),
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
|
||||
execa("pnpm", ["--filter", "backend", "watch"], {
|
||||
cwd: __dirname + "/../",
|
||||
cwd: join(__dirname, "/../"),
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
|
||||
execa("pnpm", ["--filter", "client", "watch"], {
|
||||
cwd: __dirname + "/../",
|
||||
cwd: join(__dirname, "/../"),
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
|
||||
execa("pnpm", ["--filter", "sw", "watch"], {
|
||||
cwd: __dirname + "/../",
|
||||
cwd: join(__dirname, "/../"),
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
|
@ -34,7 +38,7 @@ const execa = require("execa");
|
|||
const start = async () => {
|
||||
try {
|
||||
await execa("pnpm", ["start"], {
|
||||
cwd: __dirname + "/../",
|
||||
cwd: join(__dirname, "/../"),
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
Loading…
Reference in a new issue