Skip to content

Commit dcc1fb2

Browse files
committed
build(package.json): 🛠️ update build script with tsup-node
- Update the build script for the project to use tsup-node instead of ts-node - Remove "-e .env.production" since tsup does not require dotenv for configuration
1 parent c18380a commit dcc1fb2

File tree

5 files changed

+439
-16
lines changed

5 files changed

+439
-16
lines changed

nodemon.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"watch": ["src", ".env"],
3+
"ext": "js,ts,json,yaml",
4+
"ignore": ["src/logs/*", "src/**/*.{spec,test}.ts"],
5+
"exec": "ts-node src/server.ts"
6+
}

package.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Node TS App Template",
66
"keywords": [
77
"ts",
8-
"library",
8+
"app",
99
"production",
1010
"template",
1111
"node"
@@ -25,12 +25,12 @@
2525
},
2626
"type": "module",
2727
"scripts": {
28-
"build": "npx turbo run build:node",
29-
"build:node": "dotenv -e .env.production ts-node src/index.ts",
28+
"build": "npx turbo run build:tsup",
29+
"build:tsup": "tsup-node",
3030
"commit": "gacp",
3131
"contributors:add": "all-contributors add",
3232
"contributors:generate": "all-contributors generate",
33-
"dev": "dotenv -e .env.development nodemon src/index.ts",
33+
"dev": "nodemon",
3434
"format": "npx turbo run format:eslint format:md format:prettier",
3535
"format:eslint": "eslint --cache --report-unused-disable-directives --color . --fix",
3636
"format:md": "markdownlint --fix **/*.md \".github/**/*.md\"",
@@ -45,8 +45,10 @@
4545
"lint:types": "tsc --noEmit",
4646
"populate:dictionary": "del-cli project-words.txt && cspell --words-only --unique --gitignore --cache --dot \"**/*\" | sort --ignore-case >> project-words.txt",
4747
"prepare": "husky install",
48-
"release": "dotenv -e .env.releaseit node release-it/getCommitsSinceLastRelease.js && release-it --ci",
48+
"release": "node release-it/getCommitsSinceLastRelease.js && release-it --ci",
4949
"release:dryrun": "release-it --dry-run",
50+
"start": "node dist/server.js",
51+
"start:production": "dotenv -e .env.production node dist/server.js",
5052
"test": "echo \"no test specified\" && exit 0"
5153
},
5254
"commitlint": {
@@ -114,6 +116,7 @@
114116
"title-case": "3.0.3",
115117
"toml-eslint-parser": "0.5.0",
116118
"ts-node": "^10.9.1",
119+
"tsup": "^6.7.0",
117120
"turbo": "1.8.8",
118121
"typescript": "5.0.4",
119122
"yaml-eslint-parser": "1.2.0"

0 commit comments

Comments
 (0)