From 93a3ff946cc7771e42b6359f847539df0415235b Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 23 Jan 2024 01:37:50 +0900 Subject: [PATCH] dev: build backend-rs and firefish-js at first these modules are imported by other modules --- Dockerfile | 3 ++- package.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf4f13ab5..9e7e399c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,8 @@ ENV VERSION=${VERSION} RUN pnpm pkg set version="${VERSION}" # Compile -RUN env NODE_ENV=production sh -c "pnpm run --filter '!backend-rs' build && pnpm run gulp" +RUN env NODE_ENV=production sh -c "pnpm --filter 'firefish-js' run build" +RUN env NODE_ENV=production sh -c "pnpm --filter '!backend-rs' --filter '!firefish-js' -r --parallel run build && pnpm run gulp" # Trim down the dependencies to only those for production RUN pnpm install --prod --frozen-lockfile diff --git a/package.json b/package.json index e25699aed..93db99689 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "private": true, "scripts": { "rebuild": "pnpm run clean && pnpm run build", - "build": "pnpm --filter firefish-js run build && pnpm --filter !firefish-js -r --parallel run build && pnpm run gulp", + "build": "pnpm --filter backend-rs run build && pnpm --filter firefish-js run build && pnpm --filter !firefish-js --filter !backend-rs -r --parallel run build && pnpm run gulp", "start": "pnpm --filter backend run start", "start:container": "pnpm run gulp && pnpm run migrate && pnpm run start", "init": "pnpm run migrate", @@ -25,7 +25,7 @@ "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 clean && pnpm --filter firefish-js run build:types && pnpm -r --parallel run build:debug && pnpm run gulp", + "build:debug": "pnpm clean && pnpm --filter backend-rs run build:debug && pnpm --filter firefish-js run build:debug && pnpm --filter firefish-js run build:types && pnpm --filter !firefish-js --filter !backend-rs -r --parallel run build:debug && pnpm run gulp", "format": "pnpm -r --parallel run format", "clean": "pnpm node ./scripts/clean-built.mjs", "clean-cargo": "pnpm node ./scripts/clean-cargo.mjs",