Skip to content

Commit

Permalink
using nx/js plugin to manage tsc tasks and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
fungairino committed Nov 15, 2024
1 parent 42dbf8e commit 6614df1
Show file tree
Hide file tree
Showing 6 changed files with 990 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
node-version-file: applications/browser-extension/package.json
cache: npm
- run: npm ci
- run: npm run build:typecheck
- run: npm run typecheck

lint:
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions applications/browser-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,18 @@
},
"msw": {
"workerDirectory": "public"
},
"nx": {
"targets": {
"build": {
"outputs": [
"{workspaceRoot}/dist"
],
"cache": true,
"dependsOn": [
"^build"
]
}
}
}
}
4 changes: 1 addition & 3 deletions libraries/util-debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"test": "TZ=UTC jest",
"test:ci": "TZ=UTC jest",
"lint": "eslint src --ext js,jsx,ts,tsx --quiet --report-unused-disable-directives",
"lint:fast": "ESLINT_NO_IMPORTS=1 eslint src --ext js,jsx,ts,tsx --quiet",
"build": "tsc --build",
"build:typecheck": "tsc --build"
"lint:fast": "ESLINT_NO_IMPORTS=1 eslint src --ext js,jsx,ts,tsx --quiet"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
Expand Down
31 changes: 18 additions & 13 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{workspaceRoot}/dist"],
"cache": true
},
"test": {
"dependsOn": ["^build:typecheck"],
"dependsOn": ["typecheck"],
"cache": true
},
"test:ci": {
"dependsOn": ["^build:typecheck"],
"dependsOn": ["typecheck"],
"cache": true
},
"lint": {
"dependsOn": ["^build:typecheck"],
"cache": true
},
"build:typecheck": {
"dependsOn": ["^build:typecheck"],
"dependsOn": ["typecheck"],
"cache": true
}
},
"defaultBase": "main",
"defaultProject": "@pixiebrix/extension"
"defaultProject": "@pixiebrix/extension",
"plugins": [
{
"plugin": "@nx/js/typescript",
"options": {
"typecheck": {
"targetName": "typecheck"
},
"build": {
"targetName": "tsc:build",
"configName": "tsconfig.lib.json"
}
}
}
]
}
Loading

0 comments on commit 6614df1

Please sign in to comment.