Skip to content

Commit

Permalink
Cleanup build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentaTomas committed Jul 30, 2023
1 parent 8e2a345 commit c626055
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nodemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"src/generated/**/*"
],
"ext": "ts",
"exec": "npx tsoa routes && npx tsx src/index.ts"
"exec": "npm run generate && npx tsx src/index.ts"
}
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@
"main": "lib/index.js",
"scripts": {
"dev": "nodemon",
"build": "npm run generate && npm run check-types && ./scripts/build.js",
"build": "npm run generate && tsc --noEmit && ./scripts/build.js",
"start": "node lib/index.js",
"generate": "tsoa spec-and-routes && npm run spec:format",
"spec:format": "./scripts/formatSpec.js",
"generate": "tsoa spec-and-routes && ./scripts/formatSpec.js",
"docker:build": "docker build -t e2b/chatgpt-plugin-api .",
"docker:run": "docker run --init -p 3000:3000 e2b/chatgpt-plugin-api",
"check-types": "tsc --noEmit"
"docker:start": "docker run --init -p 3000:3000 e2b/chatgpt-plugin-api"
}
}
4 changes: 1 addition & 3 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

const esbuild = require('esbuild')

const isDev = process.env.NODE_ENV === 'development'

const makeAllPackagesExternalPlugin = {
name: 'make-all-packages-external',
setup(build) {
Expand All @@ -19,7 +17,7 @@ const makeAllPackagesExternalPlugin = {
esbuild
.build({
bundle: true,
minify: !isDev,
minify: true,
tsconfig: 'tsconfig.json',
platform: 'node',
target: 'node18',
Expand Down

0 comments on commit c626055

Please sign in to comment.