mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
build: add separate tsconfig.build.json
this prevents tsc from unnecessarily transpiling the frontend part as well: previously it was transpiled by tsc, but the files got discarded and replaced by the files built by webpack. speeds up tsc command a bit as well: from 14 seconds to ~8 secs
This commit is contained in:
parent
a6e7f98f69
commit
cefc402263
@ -44,7 +44,7 @@
|
|||||||
"docs:build-frontend": "rimraf ./docs/frontend_api && jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js",
|
"docs:build-frontend": "rimraf ./docs/frontend_api && jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js",
|
||||||
"docs:build": "npm run docs:build-backend && npm run docs:build-frontend",
|
"docs:build": "npm run docs:build-backend && npm run docs:build-frontend",
|
||||||
"build:webpack": "tsx node_modules/webpack/bin/webpack.js -c webpack.config.ts",
|
"build:webpack": "tsx node_modules/webpack/bin/webpack.js -c webpack.config.ts",
|
||||||
"build:prepare-dist": "npm run build:webpack && rimraf ./dist && tsc && tsx ./bin/copy-dist.ts",
|
"build:prepare-dist": "npm run build:webpack && rimraf ./dist && tsc -p tsconfig.build.json && tsx ./bin/copy-dist.ts",
|
||||||
"test": "npm run client:test && npm run server:test",
|
"test": "npm run client:test && npm run server:test",
|
||||||
"server:test": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest",
|
"server:test": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest",
|
||||||
"server:coverage": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --coverage",
|
"server:coverage": "cross-env TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --coverage",
|
||||||
|
27
tsconfig.build.json
Normal file
27
tsconfig.build.json
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "NodeNext",
|
||||||
|
"declaration": false,
|
||||||
|
"sourceMap": true,
|
||||||
|
"outDir": "./build",
|
||||||
|
"strict": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"lib": ["ES2023"],
|
||||||
|
"downlevelIteration": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"verbatimModuleSyntax": true
|
||||||
|
},
|
||||||
|
"include": ["./src/**/*.[jt]s", "./*.ts"],
|
||||||
|
"exclude": [
|
||||||
|
"./node_modules/**/*",
|
||||||
|
"./spec-es6/**/*.ts",
|
||||||
|
"./spec/**/*",
|
||||||
|
"./**/*.spec.ts",
|
||||||
|
"./src/public/**/*",
|
||||||
|
"./*.config.[jt]s",
|
||||||
|
],
|
||||||
|
"files": ["src/types.d.ts"]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user