Update tsconfig files and switch to _build for outputs, for consistency with main grist repo

This commit is contained in:
Dmitry S 2020-05-22 02:14:28 -04:00
parent a5fbc8fcd2
commit ad35f54b87
9 changed files with 39 additions and 30 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
/node_modules/ /node_modules/
/build/ /_build/
/static/*.bundle.js /static/*.bundle.js
/static/*.bundle.js.map /static/*.bundle.js.map

View File

@ -1,8 +1,5 @@
{ {
"extends": "../../buildtools/tsconfig-base.json", "extends": "../../buildtools/tsconfig-base.json",
"compilerOptions": {
"outDir": "../../build/app/client"
},
"references": [ "references": [
{ "path": "../common" } { "path": "../common" }
] ]

View File

@ -1,6 +1,3 @@
{ {
"extends": "../../buildtools/tsconfig-base.json", "extends": "../../buildtools/tsconfig-base.json",
"compilerOptions": {
"outDir": "../../build/app/common",
}
} }

View File

@ -1,8 +1,5 @@
{ {
"extends": "../../buildtools/tsconfig-base.json", "extends": "../../buildtools/tsconfig-base.json",
"compilerOptions": {
"outDir": "../../build/app/server",
},
"references": [ "references": [
{ "path": "../common" } { "path": "../common" }
] ]

View File

@ -8,7 +8,16 @@
"noImplicitAny": true, "noImplicitAny": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"moduleResolution": "node", "moduleResolution": "node",
"allowJs": true,
"baseUrl": "..", "baseUrl": "..",
"rootDir": "..",
"outDir": "../_build",
"paths": {
"*": [
"*",
"grist-core/*",
],
},
"composite": true, "composite": true,
"plugins": [{ "plugins": [{
"name": "typescript-tslint-plugin" "name": "typescript-tslint-plugin"

View File

@ -7,7 +7,7 @@ const path = require('path');
module.exports = { module.exports = {
target: 'web', target: 'web',
entry: { entry: {
main: "./build/app/client/index.js", main: "app/client/index.js",
}, },
output: { output: {
filename: "[name].bundle.js", filename: "[name].bundle.js",
@ -33,7 +33,7 @@ module.exports = {
devtool: "source-map", devtool: "source-map",
resolve: { resolve: {
modules: [ modules: [
path.resolve('./build'), path.resolve('./_build'),
path.resolve('./node_modules') path.resolve('./node_modules')
], ],
}, },

View File

@ -4,9 +4,9 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "tsc --build app -w --preserveWatchOutput & webpack --config buildtools/webpack.config.js --mode development --watch --hide-modules & nodemon -w build/app/server -w build/app/common build/app/server/server & wait", "start": "tsc --build -w --preserveWatchOutput & webpack --config buildtools/webpack.config.js --mode development --watch --hide-modules & nodemon -w _build/app/server -w _build/app/common _build/app/server/server & wait",
"build:prod": "tsc --build app && webpack --config buildtools/webpack.config.js --mode production", "build:prod": "tsc --build && webpack --config buildtools/webpack.config.js --mode production",
"start:prod": "node build/app/server/server" "start:prod": "node _build/app/server/server"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",

9
tsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"extends": "./buildtools/tsconfig-base.json",
"files": [],
"include": [],
"references": [
{ "path": "./app" },
// { "path": "./test" },
]
}