1
0
Fork 1
mirror of https://example.com synced 2024-11-22 17:46:39 +09:00

fix: make clean/dev commands work

This commit is contained in:
naskya 2023-11-06 10:30:00 +09:00
parent e320af9be9
commit 5a2a4e6e36
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
4 changed files with 25 additions and 16 deletions

View file

@ -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": {

View file

@ -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,

View file

@ -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,

View file

@ -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,
});