Skip to content

Commit 931ecf5

Browse files
chore(scripts): align npm scripts and docs with Vue stack
- Add `dev` alias for `start` (cross-stack consistency) - Add `test:unit` alias for `test` (one-shot, mirrors Vue naming) - Add `format` script (prettier already installed, script was missing) - Document `prod`, `format`, `test:unit`, `release` strategy in CLAUDE.md - Update README and copilot-instructions to reflect all scripts
1 parent cf3a66d commit 931ecf5

4 files changed

Lines changed: 29 additions & 16 deletions

File tree

.github/copilot-instructions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77

88
## Canonical commands
99

10-
- Dev: `npm start`
10+
- Dev: `npm start` (alias: `npm run dev`)
1111
- Debug: `npm run debug`
12-
- Tests: `npm test` (watch: `npm run test:watch`)
12+
- Tests: `npm test` / `npm run test:unit` (one-shot) or `npm run test:watch` (watch)
1313
- Coverage: `npm run test:coverage`
1414
- Lint: `npm run lint`
1515
- Lint fix: `npm run lint:fix`
16+
- Format: `npm run format`
1617
- Seed: `npm run seed:dev`
1718
- Commit: `npm run commit`
19+
- Release (CI): `npm run release:auto`
1820

1921
## Available prompts
2022

CLAUDE.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ The `.claude/` folder contains embedded settings, skills, and agents that are av
1212

1313
## Canonical commands
1414

15-
| Command | Script | Description |
16-
| ------------- | ------------------------ | ---------------------------------------------- |
17-
| **Dev** | `npm start` | Start dev server at `http://localhost:3000/` |
18-
| **Debug** | `npm run debug` | Start with nodemon and inspector |
19-
| **Test** | `npm test` | Run all tests |
20-
| **Watch** | `npm run test:watch` | Run tests in watch mode |
21-
| **Coverage** | `npm run test:coverage` | Generate test coverage |
22-
| **Lint** | `npm run lint` | Check code quality |
23-
| **Lint fix** | `npm run lint:fix` | Auto-fix linting issues |
24-
| **Seed** | `npm run seed:dev` | Seed development database |
25-
| **Commit** | `npm run commit` | Commit with commitizen |
26-
| **Docker** | `docker-compose up` | Start with docker-compose |
15+
| Command | Script | Description |
16+
| ---------------- | ------------------------ | ---------------------------------------------- |
17+
| **Dev** | `npm start` | Start dev server at `http://localhost:3000/` |
18+
| **Dev (alias)** | `npm run dev` | Alias for `npm start` |
19+
| **Debug** | `npm run debug` | Start with nodemon and inspector |
20+
| **Prod** | `npm run prod` | Start in production mode |
21+
| **Test** | `npm test` | Run all tests (one-shot) |
22+
| **Unit test** | `npm run test:unit` | Run unit tests once (alias of `npm test`) |
23+
| **Watch** | `npm run test:watch` | Run tests in watch mode |
24+
| **Coverage** | `npm run test:coverage` | Generate test coverage |
25+
| **Lint** | `npm run lint` | Check code quality |
26+
| **Lint fix** | `npm run lint:fix` | Auto-fix linting issues |
27+
| **Format** | `npm run format` | Format with Prettier |
28+
| **Seed** | `npm run seed:dev` | Seed development database |
29+
| **Commit** | `npm run commit` | Commit with commitizen |
30+
| **Release** | `npm run release` | Manual release (standard-version) |
31+
| **Release (CI)** | `npm run release:auto` | Semantic release for CI |
32+
| **Docker** | `docker-compose up` | Start with docker-compose |
2733

2834
## Preflight
2935

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ npm install
6060
### Development
6161

6262
```bash
63-
npm start
63+
npm start # or: npm run dev
6464
```
6565

6666
Runs the server at `http://localhost:3000/`. For auto-reload during development, use `npm run debug` (nodemon).
@@ -80,7 +80,8 @@ npm run prod
8080
### Testing
8181

8282
```bash
83-
npm test # Run all tests
83+
npm test # Run all tests (one-shot)
84+
npm run test:unit # Run unit tests once (alias of npm test)
8485
npm run test:watch # Run tests in watch mode
8586
npm run test:coverage # Generate coverage report
8687
```
@@ -92,6 +93,7 @@ Tests are organized per module in `modules/*/tests/`
9293
```bash
9394
npm run lint # Check code quality (read-only)
9495
npm run lint:fix # Auto-fix code quality issues
96+
npm run format # Format code with Prettier
9597
```
9698

9799
### Database Seeding

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
},
2525
"scripts": {
2626
"start": "node server.js",
27+
"dev": "npm run start",
2728
"debug": "nodemon --inspect server.js",
2829
"prod": "cross-env NODE_ENV=production node server.js --name=node",
2930
"test": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand",
31+
"test:unit": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand",
3032
"test:watch": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --watch --runInBand",
3133
"test:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --coverage --runInBand",
3234
"lint": "eslint ./modules ./lib ./config ./scripts",
@@ -38,6 +40,7 @@
3840
"seed:mongodrop": "node scripts/seed.js drop",
3941
"generate:sllCerts": "scripts/generate-ssl-certs.sh",
4042
"lint:fix": "eslint --fix ./modules ./lib ./config ./scripts",
43+
"format": "prettier --write .",
4144
"snyk-protect": "snyk protect",
4245
"commit": "npx cz",
4346
"release": "standard-version",

0 commit comments

Comments
 (0)