Skip to content

Commit f0ccc91

Browse files
chore: move to nx (#46)
* chore: move to nx * feat(nx-cloud): setup nx cloud workspace (#47) This commit sets up Nx Cloud for your Nx workspace, enabling distributed caching and the Nx Cloud GitHub integration for fast CI and improved developer experience. You can access your Nx Cloud workspace by going to https://cloud.nx.app/orgs/60bf2bb0b7f2ae00054c0716/workspaces/6ababfaa6b3b7cbe16499a58 > [!TIP] > Run `npx nx generate ci-workflow` if you don't have a CI script configured yet. **Note:** This commit attempts to maintain formatting of the nx.json file, however you may need to correct formatting by running an nx format command and committing the changes. * Update .github/workflows/ci.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent d5f7f69 commit f0ccc91

9 files changed

Lines changed: 7344 additions & 3909 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
permissions:
1010
contents: read
11+
# nx-set-shas reads previous workflow runs to find the last green main commit
12+
actions: read
1113

1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.ref }}
@@ -19,6 +21,9 @@ jobs:
1921
timeout-minutes: 15
2022
steps:
2123
- uses: actions/checkout@v7
24+
with:
25+
fetch-depth: 0
26+
persist-credentials: false
2227

2328
- uses: pnpm/action-setup@v5
2429

@@ -29,27 +34,23 @@ jobs:
2934

3035
- run: pnpm install --frozen-lockfile
3136

37+
- uses: nrwl/nx-set-shas@v4
38+
3239
- name: Check formatting
3340
run: pnpm format:check
3441

3542
- name: Type-check
3643
run: pnpm typecheck
3744

38-
- name: Test host app
39-
run: pnpm test
45+
- name: Test and build affected projects
46+
run: pnpm exec nx affected -t test build
4047

4148
- name: Test devtools package
4249
run: pnpm test:devtools
4350

44-
- name: Build Angular host app (SSR)
45-
run: pnpm build
46-
4751
- name: Build Chrome extension
4852
run: pnpm extension:build
4953

50-
- name: Build devtools package
51-
run: pnpm devtools:build-pkg
52-
5354
- name: Check committed build output is current
5455
run: |
5556
stale=$(git status --porcelain -- extension/ui)

‎.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,8 @@ __screenshots__/
4343
# System files
4444
.DS_Store
4545
Thumbs.db
46+
47+
# Nx
48+
.nx/cache
49+
.nx/workspace-data
50+
.nx/migrate-runs

‎.vscode/extensions.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3-
"recommendations": ["angular.ng-template"]
2+
"recommendations": ["angular.ng-template", "nrwl.angular-console"]
43
}

‎angular.json‎

Lines changed: 0 additions & 79 deletions
This file was deleted.

‎nx.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"targetDefaults": {
4+
"build": { "cache": true, "dependsOn": ["^build"], "inputs": ["production", "^production"] },
5+
"test": { "cache": true, "inputs": ["default", "^production"] }
6+
},
7+
"namedInputs": {
8+
"sharedGlobals": [],
9+
"default": ["{projectRoot}/**/*", "sharedGlobals"],
10+
"production": ["default"]
11+
},
12+
"nxCloudId": "6ababfaa6b3b7cbe16499a58",
13+
"analytics": true
14+
}

‎package.json‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
},
88
"scripts": {
99
"ng": "ng",
10-
"start": "pnpm devtools:build-pkg && ng serve",
11-
"build": "ng build",
12-
"watch": "ng build --watch --configuration development",
13-
"test": "ng test",
10+
"start": "pnpm devtools:build-pkg && nx serve",
11+
"build": "nx build",
12+
"watch": "nx build --watch --configuration development",
13+
"test": "nx test",
1414
"test:devtools": "vitest run --root packages/ng-devtools",
1515
"typecheck": "tsc -p tsconfig.app.json --noEmit && tsc -p tsconfig.spec.json --noEmit && tsc -p app/tsconfig.json --noEmit && tsc -p packages/ng-devtools",
1616
"format": "prettier --write .",
@@ -51,14 +51,20 @@
5151
},
5252
"devDependencies": {
5353
"@analogjs/vite-plugin-angular": "^2.7.2",
54+
"@angular-devkit/core": "^22.1.8",
55+
"@angular-devkit/schematics": "^22.1.8",
5456
"@angular/build": "^22.1.8",
5557
"@angular/cli": "^22.1.8",
5658
"@angular/compiler-cli": "^22.1.0",
5759
"@devframes/agentic": "^1.1.0",
5860
"@devframes/vite": "^1.0.0",
61+
"@nx/angular": "23.2.1",
62+
"@nx/workspace": "23.2.1",
63+
"@schematics/angular": "^22.1.8",
5964
"@types/express": "^5.0.1",
6065
"@types/node": "^24.0.0",
6166
"jsdom": "^28.0.0",
67+
"nx": "23.2.1",
6268
"prettier": "^3.8.1",
6369
"sass": "^1.105.0",
6470
"typescript": "~6.0.2",

‎packages/ng-devtools/package.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@
3939
"build": "tsdown && vite build --config ../../app/vite.config.ts --outDir ../packages/ng-devtools/dist/public --emptyOutDir",
4040
"prepack": "pnpm build"
4141
},
42+
"nx": {
43+
"targets": {
44+
"build": {
45+
"inputs": [
46+
"production",
47+
"^production",
48+
"{workspaceRoot}/app/**/*"
49+
]
50+
}
51+
}
52+
},
4253
"files": [
4354
"dist",
4455
"bin.mjs"

0 commit comments

Comments
 (0)