Skip to content

Commit

Permalink
initialize nx configuration, and use nx task runner (#9508)
Browse files Browse the repository at this point in the history
  • Loading branch information
fungairino authored Nov 12, 2024
1 parent 0571b08 commit 2196577
Show file tree
Hide file tree
Showing 8 changed files with 730 additions and 2,151 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
node-version-file: package.json
cache: npm
- run: npm ci
- run: npm run lint:full
- run: npm run lint

dead-code:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ storybook-static
/applications/browser-extension/end-to-end-tests/blob-report.7z
/playwright-report/
.playwright-report/

# NX monorepo cache directories https://nx.dev/
.nx/cache
.nx/workspace-data
3 changes: 1 addition & 2 deletions applications/browser-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
"test:watch": "TZ=UTC jest --watchAll",
"test:e2e": "playwright test",
"test:e2e:debug": "PWDEBUG=console playwright test",
"lint": "npm run lint:full -- --rule '{\"import/no-cycle\": \"off\"}'",
"lint": "eslint src end-to-end-tests --ext js,jsx,ts,tsx --quiet --report-unused-disable-directives",
"lint:fast": "ESLINT_NO_IMPORTS=1 eslint src --ext js,jsx,ts,tsx --quiet",
"lint:full": "eslint src end-to-end-tests --ext js,jsx,ts,tsx --quiet --report-unused-disable-directives",
"lint:staged": "eslint --ext js,jsx,ts,tsx --fix --quiet --report-unused-disable-directives",
"fix": "npm run lint -- --fix",
"watch": "concurrently npm:watch:webpack 'npm:watch:*(!webpack) -- --preserveWatchOutput' -r",
Expand Down
3 changes: 1 addition & 2 deletions libraries/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"description": "PixieBrix Utility Library",
"scripts": {
"test": "TZ=UTC jest",
"lint": "npm run lint:full -- --rule '{\"import/no-cycle\": \"off\"}'",
"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",
"lint:full": "eslint src --ext js,jsx,ts,tsx --quiet --report-unused-disable-directives",
"build": "echo 'buildless package'",
"build:typecheck": "tsc --noEmit"
},
Expand Down
21 changes: 21 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist"],
"cache": true
},
"test": {
"cache": true
},
"lint": {
"cache": true
},
"build:typecheck": {
"cache": true
}
},
"defaultBase": "main",
"defaultProject": "@pixiebrix/extension"
}
Loading

0 comments on commit 2196577

Please sign in to comment.