Skip to content

Commit f386eae

Browse files
christophechevalierjcabannes
authored andcommitted
chore: update configuration for pnpm workflow
- Update GitHub Actions CI to use pnpm - Update .gitignore with pnpm patterns - Update nx.json for pnpm workspace compatibility - Update README with pnpm installation instructions
1 parent 55267c2 commit f386eae

4 files changed

Lines changed: 137 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,18 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818
with:
19-
filter: tree:0
2019
fetch-depth: 0
2120

22-
# This enables task distribution via Nx Cloud
23-
# Run this command as early as possible, before dependencies are installed
24-
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
25-
# Uncomment this line to enable task distribution
26-
# - run: npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
21+
- uses: pnpm/action-setup@v4
2722

28-
# Cache node_modules
2923
- uses: actions/setup-node@v4
3024
with:
3125
node-version: 24
32-
cache: 'npm'
26+
cache: 'pnpm'
3327

34-
- run: npm ci
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
3530

36-
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
37-
# - run: npx nx-cloud record -- echo Hello World
38-
- run: npx nx run-many -t lint test build typecheck
39-
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
40-
- run: npx nx fix-ci
41-
if: always()
31+
# TODO: Re-enable when NX Monorepo is fixed
32+
# - name: Run linting, tests, build and typecheck
33+
# run: pnpm exec nx run-many -t lint test build typecheck

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ out-tsc
88
# dependencies
99
node_modules
1010

11+
# Lock files
12+
package-lock.json
13+
yarn.lock
14+
1115
# IDEs and editors
1216
/.idea
1317
.project

README.md

Lines changed: 125 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,129 @@
11
# linid-im-front-community-plugins
22

3-
To build catalog-ui:
4-
npx vite build --config apps/catalog-ui/vite.config.ts
3+
Community plugins for LinID Identity Manager frontend.
54

6-
to run locally:
7-
nx run catalog-ui:preview
5+
## Installation
86

7+
This project uses **pnpm** as the package manager with Nx for monorepo management.
8+
9+
### Quick start
10+
11+
```sh
12+
# Enable Corepack (included with Node.js 16.9+)
13+
corepack enable
14+
15+
# Install dependencies (Corepack will use pnpm@10.20.0 automatically)
16+
pnpm install
17+
```
18+
19+
**Note:** The `packageManager` field in `package.json` ensures everyone uses the same pnpm version (10.20.0).
20+
21+
### Using pnpm (recommended)
22+
23+
```sh
24+
# Install pnpm globally if you haven't already
25+
npm install -g pnpm
26+
27+
# Install dependencies
28+
pnpm install
29+
```
30+
31+
## Development
32+
33+
This is an Nx monorepo containing micro-frontend applications using Module Federation.
34+
35+
### Build all projects
36+
37+
```sh
38+
# With pnpm (recommended)
39+
pnpm build
40+
41+
# With npm
42+
npm run build
43+
```
44+
45+
### Build catalog-ui
46+
47+
```sh
48+
# Using Nx
49+
pnpm exec nx build catalog-ui
50+
51+
# Or using the npm script
52+
pnpm catalog-ui:build
53+
```
54+
55+
### Run catalog-ui locally
56+
57+
```sh
58+
# Preview the built catalog-ui
59+
pnpm exec nx run catalog-ui:preview
60+
61+
# Or using the npm script
62+
pnpm catalog-ui:preview
63+
```
64+
65+
### Development server
66+
67+
```sh
68+
# Start dev server for catalog-ui
69+
pnpm exec nx serve catalog-ui
70+
```
71+
72+
## Code Quality
73+
74+
This project uses ESLint, Prettier, and TypeScript to ensure consistent code quality.
75+
76+
### Run all checks
77+
78+
```sh
79+
# Run linting, tests, build, and type checking for all projects
80+
pnpm exec nx run-many -t lint test build typecheck
81+
```
82+
83+
### Linting
84+
85+
```sh
86+
# Lint all projects
87+
pnpm lint
88+
89+
# Lint a specific project
90+
pnpm exec nx lint catalog-ui
91+
```
92+
93+
### Type Checking
94+
95+
```sh
96+
# Type check all projects
97+
pnpm typecheck
98+
99+
# Type check a specific project
100+
pnpm exec nx typecheck catalog-ui
101+
```
102+
103+
### Testing
104+
105+
```sh
106+
# Run tests for all projects
107+
pnpm test
108+
109+
# Run tests for a specific project
110+
pnpm exec nx test catalog-ui
111+
```
112+
113+
### Nx Commands
114+
115+
```sh
116+
# View project graph
117+
pnpm exec nx graph
118+
119+
# Clear Nx cache
120+
pnpm exec nx reset
121+
```
122+
123+
## CI/CD
124+
125+
The project uses GitHub Actions for continuous integration. See [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for details.
126+
127+
## License
128+
129+
This project is licensed under the GNU Affero General Public License version 3 - see [LICENSE](LICENSE.md) for details.

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"defaultBase": "main",
34
"namedInputs": {
45
"default": ["{projectRoot}/**/*", "sharedGlobals"],
56
"production": [
@@ -12,7 +13,6 @@
1213
],
1314
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"]
1415
},
15-
"nxCloudId": "690b675cc93704644b382abb",
1616
"plugins": [
1717
{
1818
"plugin": "@nx/js/typescript",

0 commit comments

Comments
 (0)