Skip to content

Commit 98e8bca

Browse files
christophechevalierjcabannes
authored andcommitted
docs: add workspace scripts and improve documentation
- Add convenience scripts (build, lint, test, format, graph) - Update README with prerequisites and Nx commands - Update pnpm lockfile
1 parent 5d1dd81 commit 98e8bca

3 files changed

Lines changed: 61 additions & 55 deletions

File tree

README.md

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Community plugins for LinID Identity Manager frontend.
66

77
This project uses **pnpm** as the package manager with Nx for monorepo management.
88

9+
### Prerequisites
10+
11+
- Node.js 20+ (LTS)
12+
- pnpm 10.20.0 (managed via Corepack)
13+
914
### Quick start
1015

1116
```sh
@@ -32,41 +37,27 @@ pnpm install
3237

3338
This is an Nx monorepo containing micro-frontend applications using Module Federation.
3439

35-
### Build all projects
40+
### Quick Commands
3641

3742
```sh
38-
# With pnpm (recommended)
39-
pnpm build
40-
41-
# With npm
42-
npm run build
43-
```
43+
# Start development server for catalog-ui
44+
pnpm dev
4445

45-
### Build catalog-ui
46-
47-
```sh
48-
# Using Nx
49-
pnpm exec nx build catalog-ui
46+
# Build all projects
47+
pnpm build
5048

51-
# Or using the npm script
52-
pnpm catalog-ui:build
49+
# Run all checks (lint, test, typecheck, build)
50+
pnpm exec nx run-many -t lint test typecheck build
5351
```
5452

55-
### Run catalog-ui locally
53+
### Build all projects
5654

5755
```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
56+
# With pnpm (recommended)
57+
pnpm build
6658

67-
```sh
68-
# Start dev server for catalog-ui
69-
pnpm exec nx serve catalog-ui
59+
# With npm
60+
npm run build
7061
```
7162

7263
## Code Quality
@@ -87,7 +78,7 @@ pnpm exec nx run-many -t lint test build typecheck
8778
pnpm lint
8879

8980
# Lint a specific project
90-
pnpm exec nx lint catalog-ui
81+
pnpm catalog-ui:lint
9182
```
9283

9384
### Type Checking
@@ -97,7 +88,7 @@ pnpm exec nx lint catalog-ui
9788
pnpm typecheck
9889

9990
# Type check a specific project
100-
pnpm exec nx typecheck catalog-ui
91+
pnpm catalog-ui:typecheck
10192
```
10293

10394
### Testing
@@ -107,17 +98,23 @@ pnpm exec nx typecheck catalog-ui
10798
pnpm test
10899

109100
# Run tests for a specific project
110-
pnpm exec nx test catalog-ui
101+
pnpm catalog-ui:test
111102
```
112103

113-
### Nx Commands
104+
## Nx Commands
114105

115106
```sh
116107
# View project graph
117-
pnpm exec nx graph
108+
pnpm graph
118109

119110
# Clear Nx cache
120-
pnpm exec nx reset
111+
pnpm reset
112+
113+
# Run affected tasks only (based on git changes)
114+
pnpm exec nx affected -t build test lint
115+
116+
# Show what will be affected
117+
pnpm exec nx show projects --affected
121118
```
122119

123120
## CI/CD

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
22
"name": "@linid-im-front-community-plugins/source",
33
"version": "0.0.0",
4-
"scripts": {},
4+
"scripts": {
5+
"build": "nx run-many -t build",
6+
"lint": "nx run-many -t lint",
7+
"test": "nx run-many -t test",
8+
"typecheck": "nx run-many -t typecheck",
9+
"format": "prettier --write .",
10+
"format:check": "prettier --check .",
11+
"graph": "nx graph",
12+
"reset": "nx reset"
13+
},
514
"private": true,
615
"dependencies": {
716
"quasar": "2.18.6",

pnpm-lock.yaml

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)