Build ts, ts-projects & webpack in seperate commands

This commit is contained in:
2022-08-13 12:14:55 +02:00
parent 335155eb8f
commit 762eb6fe79

View File

@@ -5,18 +5,21 @@
"author": "Kevin Midboe", "author": "Kevin Midboe",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development webpack server", "dev": "NODE_ENV=development webpack server",
"build": "cross-env NODE_ENV=production webpack-cli build --progress", "build": "yarn build:ts-server && yarn build:webpack",
"build:ts": "yarn build:ts-server && yarn build:ts-vue",
"build:ts-server": "tsc --project tsconfig.server.json",
"build:ts-vue": "tsc --project tsconfig.json",
"build:webpack": "NODE_ENV=production webpack-cli build --progress",
"postbuild": "cp public/dist/index.html public/index.html", "postbuild": "cp public/dist/index.html public/index.html",
"clean": "rm -r public/dist 2> /dev/null; rm public/index.html 2> /dev/null", "clean": "rm -r public/dist 2> /dev/null; rm public/index.html 2> /dev/null; rm -r lib 2> /dev/null",
"start": "node server.js", "start": "node lib/server.js",
"lint": "eslint src --ext .ts,.vue", "lint": "eslint src server.ts --ext .ts,.vue",
"docs": "documentation build src/api.ts -f html -o docs/api && documentation build src/api.ts -f md -o docs/api.md" "docs": "documentation build src/api.ts -f html -o docs/api && documentation build src/api.ts -f md -o docs/api.md"
}, },
"dependencies": { "dependencies": {
"chart.js": "3.9.1", "chart.js": "3.9.1",
"connect-history-api-fallback": "2.0.0", "connect-history-api-fallback": "2.0.0",
"cross-env": "7.0.3",
"express": "4.18.1", "express": "4.18.1",
"vue": "3.2.37", "vue": "3.2.37",
"vue-router": "4.1.3", "vue-router": "4.1.3",
@@ -27,6 +30,7 @@
"@babel/plugin-transform-runtime": "7.18.10", "@babel/plugin-transform-runtime": "7.18.10",
"@babel/preset-env": "7.18.10", "@babel/preset-env": "7.18.10",
"@babel/runtime": "7.18.9", "@babel/runtime": "7.18.9",
"@types/express": "4.17.13",
"@types/node": "18.6.1", "@types/node": "18.6.1",
"@typescript-eslint/eslint-plugin": "5.33.0", "@typescript-eslint/eslint-plugin": "5.33.0",
"@typescript-eslint/parser": "5.33.0", "@typescript-eslint/parser": "5.33.0",