From 3565d07e3fead20c6ddc2cc0408760b700a6b733 Mon Sep 17 00:00:00 2001 From: Kuizuo Date: Sat, 18 Nov 2023 01:21:44 +0800 Subject: [PATCH] chore: add npm script --- apps/api/.gitignore | 1 + apps/api/package.json | 3 ++- package.json | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/api/.gitignore b/apps/api/.gitignore index 148449d..d968f9f 100644 --- a/apps/api/.gitignore +++ b/apps/api/.gitignore @@ -66,3 +66,4 @@ lerna-debug.log* !.vscode/extensions.json .nestjs_repl_history +out diff --git a/apps/api/package.json b/apps/api/package.json index 485ab09..d2f3994 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -10,6 +10,7 @@ "dev": "npm run start", "dev:debug": "npm run start:debug", "repl": "npm run start -- --entryFile repl", + "bundle": "rimraf out && npm run build && ncc build dist/main.js -o out -m -t && chmod +x out/index.js", "start": "cross-env NODE_ENV=development nest start -w --path tsconfig.json", "start:debug": "cross-env NODE_ENV=development nest start --debug --watch", "start:prod": "cross-env NODE_ENV=production node dist/src/main", @@ -21,7 +22,7 @@ "test": "jest", "test:watch": "jest --watch", "doc": "compodoc -p tsconfig.json -s", - "typeorm": "NODE_ENV=development typeorm -d ./dist/config/modules/database.config.js", + "typeorm": "NODE_ENV=development typeorm -d ./dist/config/database.config.js", "migration:create": "typeorm migration:create", "migration:generate": "typeorm -- migration:generate", "migration:run": "typeorm -- migration:run", diff --git a/package.json b/package.json index de7c4c1..9c04c33 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "bootstrap": "pnpm install", "build": "turbo run build", "dev": "turbo run dev", + "bundle": "pnpm -C \"apps/api\" run bundle", "test": "turbo run test", "lint": "turbo run lint", "clean": "turbo run clean",