Skip to content

Commit

Permalink
build: remove esbuild-node-tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
wd-David committed May 4, 2022
1 parent 540c02f commit 0b7af6d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 821 deletions.
8 changes: 5 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const env = process.argv[2]
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const fs = require('fs')
Expand All @@ -23,7 +24,8 @@ const entryPoints = fileArray.filter((file) => file.endsWith('.ts'))
esbuild.build({
entryPoints,
logLevel: 'info',
outdir: 'build',
bundle: true,
platform: 'node'
outdir: env === 'dev' ? 'dist' : 'build',
bundle: env === 'dev' ? false : true,
platform: 'node',
format: 'cjs'
})
2 changes: 1 addition & 1 deletion nodemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"watch": ["src"],
"ignore": ["src/**/*.{test,spec}.ts"],
"ext": "ts,mjs,js,json,graphql",
"exec": "npx etsc && node dist",
"exec": "esbuild `find src \\( -name '*.ts' \\)` --platform=node --outdir=dist --format=cjs && node dist",
"legacyWatch": true
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@typescript-eslint/parser": "^5.21.0",
"commitizen": "^4.2.4",
"esbuild": "^0.14.38",
"esbuild-node-tsc": "^1.8.5",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
Expand Down
Loading

0 comments on commit 0b7af6d

Please sign in to comment.