diff --git a/package.json b/package.json index c11b5408..2882496f 100644 --- a/package.json +++ b/package.json @@ -9,12 +9,12 @@ "preinstall": "npx only-allow pnpm", "start": "nodemon", "mocha": "cross-env TZ='Asia/Seoul' NODE_ENV=test mocha --require ts-node/register --require tsconfig-paths/register --recursive --reporter spec --exit", - "test": "npm run sample && cross-env TZ='Asia/Seoul' npm run mocha", - "build": "tsc && tsc-alias", + "test": "pnpm run sample && cross-env TZ='Asia/Seoul' pnpm run mocha", + "build": "tsc --project tsconfig.build.json && tsc-alias", "clean": "rimraf dist/", "serve": "cross-env TZ='Asia/Seoul' NODE_ENV=production node dist/index.js", "lint": "pnpm eslint .", - "runscript": "cross-env TZ='Asia/Seoul' NODE_ENV=production node", + "runscript": "cross-env TZ='Asia/Seoul' NODE_ENV=production ts-node --require tsconfig-paths/register", "sample": "cross-env NODE_ENV=test ts-node --require tsconfig-paths/register src/sampleGenerator/index.js", "dumpDB": "cross-env NODE_ENV=test ts-node --require tsconfig-paths/register src/sampleGenerator/tools/dump.js", "restoreDB": "cross-env NODE_ENV=test ts-node --require tsconfig-paths/register src/sampleGenerator/tools/restore.js" diff --git a/scripts/chatPaymentSettlementUpdater.js b/scripts/chatPaymentSettlementUpdater.js index 76e43682..1b1d11dd 100644 --- a/scripts/chatPaymentSettlementUpdater.js +++ b/scripts/chatPaymentSettlementUpdater.js @@ -3,7 +3,7 @@ // https://github.com/sparcs-kaist/taxi-back/issues/449 const { MongoClient } = require("mongodb"); -const { mongo: mongoUrl } = require("../loadenv"); +const { mongo: mongoUrl } = require("@/loadenv"); const client = new MongoClient(mongoUrl); const db = client.db("taxi"); diff --git a/scripts/profileImageUrlUpdater.js b/scripts/profileImageUrlUpdater.js index 2b35bf1a..5814f609 100644 --- a/scripts/profileImageUrlUpdater.js +++ b/scripts/profileImageUrlUpdater.js @@ -2,7 +2,7 @@ // https://github.com/sparcs-kaist/taxi-back/issues/173 const { MongoClient } = require("mongodb"); -const { mongo: mongoUrl, aws: awsEnv } = require("../loadenv"); // FIXME: 올바른 경로로 수정해야 합니다. +const { mongo: mongoUrl, aws: awsEnv } = require("@/loadenv"); const time = Date.now(); diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..68db80dd --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["src"], +} diff --git a/tsconfig.json b/tsconfig.json index e7575db4..166f2de6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ "@/*": ["./*"] } }, - "include": ["src"], + "include": ["src", "scripts"], "exclude": ["dist", "node_modules"], "ts-node": { "files": true