dev: build backend-rs and firefish-js first

these packages are imported in other places
This commit is contained in:
naskya 2024-02-12 23:31:04 +09:00
parent fe0bfe31b3
commit b4c148a655
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
4 changed files with 73 additions and 14 deletions

View file

@ -9,7 +9,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"rebuild": "pnpm run clean && pnpm run build", "rebuild": "pnpm run clean && pnpm run build",
"build": "./scripts/build-greet.sh && pnpm --filter firefish-js run build && pnpm --filter !firefish-js -r --parallel run build && pnpm run gulp", "build": "pnpm node ./scripts/build.mjs && pnpm run gulp",
"start": "pnpm --filter backend run start", "start": "pnpm --filter backend run start",
"start:test": "pnpm --filter backend run start:test", "start:test": "pnpm --filter backend run start:test",
"init": "pnpm run migrate", "init": "pnpm run migrate",
@ -24,8 +24,8 @@
"dev:init": "pnpm run dev:down && pnpm run dev:up", "dev:init": "pnpm run dev:down && pnpm run dev:up",
"dev:staging": "NODE_OPTIONS=--max_old_space_size=3072 NODE_ENV=development pnpm run build && pnpm run start", "dev:staging": "NODE_OPTIONS=--max_old_space_size=3072 NODE_ENV=development pnpm run build && pnpm run start",
"lint": "pnpm -r --parallel run lint", "lint": "pnpm -r --parallel run lint",
"debug": "pnpm run clean && pnpm run build:debug && pnpm run start", "debug": "pnpm run build:debug && pnpm run start",
"build:debug": "pnpm -r --parallel run build:debug && pnpm run gulp", "build:debug": "pnpm run clean && pnpm node ./scripts/dev-build.mjs && pnpm run gulp",
"mocha": "pnpm --filter backend run mocha", "mocha": "pnpm --filter backend run mocha",
"test": "pnpm run mocha", "test": "pnpm run mocha",
"format": "pnpm -r --parallel run format", "format": "pnpm -r --parallel run format",

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
echo -e "\e[49;38;2;49;116;143m"
echo -e "██████╗ ██╗██████╗ ███████╗███████╗██╗███████╗██╗ ██╗ ○ ▄ ▄ "
echo -e "██╔════╝██║██╔══██╗██╔════╝██╔════╝██║██╔════╝██║ ██║ ⚬ █▄▄ █▄▄"
echo -e "█████╗ ██║██████╔╝█████╗ █████╗ ██║███████╗███████║ ▄▄▄▄▄▄ ▄ "
echo -e "██╔══╝ ██║██╔══██╗██╔══╝ ██╔══╝ ██║╚════██║██╔══██║ █ █ █▄▄"
echo -e "██║ ██║██║ ██║███████╗██║ ██║███████║██║ ██║ █ ● ● █ "
echo -e "╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ▀▄▄▄▄▄▄▀\e[0m\n"
echo -e "\e[1;34mCurrently building Firefish!\e[0m"
echo -e "\e[1;38;2;255;136;0mThis may take a while...\e[0m\n"

35
scripts/build.mjs Normal file
View file

@ -0,0 +1,35 @@
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", [
"--recursive",
"--parallel",
"--filter=backend-rs",
"--filter=firefish-js",
"run",
"build",
], {
cwd: join(__dirname, "/../"),
stdio: "inherit",
}
);
await execa(
"pnpm", [
"--recursive",
"--parallel",
"--filter=!backend-rs",
"--filter=!firefish-js",
"run",
"build",
], {
cwd: join(__dirname, "/../"),
stdio: "inherit",
}
);
})();

35
scripts/dev-build.mjs Normal file
View file

@ -0,0 +1,35 @@
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", [
"--recursive",
"--parallel",
"--filter=backend-rs",
"--filter=firefish-js",
"run",
"build:debug",
], {
cwd: join(__dirname, "/../"),
stdio: "inherit",
}
);
await execa(
"pnpm", [
"--recursive",
"--parallel",
"--filter=!backend-rs",
"--filter=!firefish-js",
"run",
"build:debug",
], {
cwd: join(__dirname, "/../"),
stdio: "inherit",
}
);
})();