Skip to content

Commit 53245a5

Browse files
committed
Split tsconfig.json for front end & back end to fix local balena builds - closes #3200
1 parent 2ea51cd commit 53245a5

File tree

6 files changed

+39
-5
lines changed

6 files changed

+39
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
npm ci
3131
- name: Check formatting
3232
run: |
33-
npx prettier -u -c '*.ts' '*.js' config src static tools
33+
npx prettier -u -c '*.js' config src static tools
3434
- name: Lint with eslint and stylelint
3535
run: |
3636
npm run lint

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: "2.1"
33
services:
44
webthings-gateway:
55
container_name: webthings-gateway
6-
image: webthingsio/gateway:2.0.0-beta.1
6+
build: .
77
restart: unless-stopped
88
network_mode: host
99
# "ports" are ignored because of "network_mode: host". Either use "ports"
File renamed without changes.

static/tsconfig.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2018",
4+
"module": "commonjs",
5+
"moduleResolution": "node",
6+
"lib": ["es2018", "dom"],
7+
"declaration": true,
8+
"declarationMap": true,
9+
"sourceMap": true,
10+
"outDir": "../build/static",
11+
"rootDir": ".",
12+
"strict": true,
13+
"noImplicitAny": true,
14+
"strictNullChecks": true,
15+
"strictFunctionTypes": true,
16+
"strictBindCallApply": true,
17+
"strictPropertyInitialization": true,
18+
"noImplicitThis": true,
19+
"alwaysStrict": true,
20+
"noUnusedLocals": true,
21+
"noUnusedParameters": true,
22+
"noImplicitReturns": true,
23+
"esModuleInterop": true,
24+
"allowJs": true,
25+
"checkJs": false,
26+
"resolveJsonModule": true,
27+
"types": ["node", "jest"]
28+
},
29+
"include": ["./**/*.ts"],
30+
"exclude": []
31+
}

tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"declarationMap": true,
1212
"sourceMap": true,
1313
"outDir": "build",
14+
"rootDir": "src",
1415
"strict": true,
1516
"noImplicitAny": true,
1617
"strictNullChecks": true,
@@ -24,7 +25,7 @@
2425
"noImplicitReturns": true,
2526
"esModuleInterop": true,
2627
"allowJs": true,
27-
"checkJs": true,
28+
"checkJs": false,
2829
"resolveJsonModule": true,
2930
"types": [
3031
"node",
@@ -33,11 +34,12 @@
3334
]
3435
},
3536
"include": [
36-
"**/*.ts"
37+
"src/**/*.ts"
3738
],
3839
"exclude": [
3940
"node_modules",
4041
"build",
41-
"image"
42+
"image",
43+
"static"
4244
]
4345
}

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ const webpackWeb = {
164164
loader: 'ts-loader',
165165
options: {
166166
onlyCompileBundledFiles: true,
167+
configFile: path.resolve(__dirname, 'static', 'tsconfig.json'),
167168
},
168169
},
169170
{

0 commit comments

Comments
 (0)