Skip to content

Commit 90267a5

Browse files
committed
Standardize build and deploy (cjs-dist-ghpages)
1 parent 6792172 commit 90267a5

File tree

8 files changed

+38
-9
lines changed

8 files changed

+38
-9
lines changed
File renamed without changes.

openspec/changes/cjs-dist-ghpages/proposal.md renamed to openspec/changes/archive/2025-12-23-cjs-dist-ghpages/proposal.md

File renamed without changes.

openspec/changes/cjs-dist-ghpages/specs/deployment/spec.md renamed to openspec/changes/archive/2025-12-23-cjs-dist-ghpages/specs/deployment/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
## ADDED Requirements
2+
## MODIFIED Requirements
33

44
### Requirement: GitHub Pages Deployment
55
The project MUST include a GitHub Actions workflow to deploy the demo website to GitHub Pages.

openspec/changes/cjs-dist-ghpages/specs/dev-server/spec.md renamed to openspec/changes/archive/2025-12-23-cjs-dist-ghpages/specs/dev-server/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
## ADDED Requirements
33

4-
### Requirement: Root Access
4+
### Requirement: Dev Server Root URL Access
55
The development server MUST serve `index.html` when accessed at the root URL (`http://localhost:5173/`).
66

77
#### Scenario: Verify Root URL

openspec/changes/cjs-dist-ghpages/specs/packaging/spec.md renamed to openspec/changes/archive/2025-12-23-cjs-dist-ghpages/specs/packaging/spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
## ADDED Requirements
33

4-
### Requirement: Pure ESM and UMD Distribution
4+
### Requirement: Modern Packaging (ESM/UMD)
55
The project SHALL NOT output CommonJS (CJS) files. The distribution MUST contain ESM modules and UMD bundles (for browser compatibility), along with TypeScript declaration files (`.d.ts`).
66

77
#### Scenario: Verify Build Output
@@ -11,14 +11,14 @@ The project SHALL NOT output CommonJS (CJS) files. The distribution MUST contain
1111
- **And** it should NOT contain `.cjs` files
1212
- **And** it should contain `.d.ts` files
1313

14-
### Requirement: Dist in Git
14+
### Requirement: Commit Dist Folder
1515
The `dist` directory MUST be committed to the git repository to allow direct installation from git.
1616

1717
#### Scenario: Verify Gitignore
1818
- **Given** I inspect `.gitignore`
1919
- **Then** `dist` or `dist/` should NOT be present
2020

21-
### Requirement: Clean Dist
21+
### Requirement: Clean Dist Output
2222
The `dist` directory MUST NOT contain demo website files (e.g., `index.html`, `index.css` related to the demo). It SHOULD only contain library assets.
2323

2424
#### Scenario: Verify Dist Config

openspec/changes/cjs-dist-ghpages/tasks.md renamed to openspec/changes/archive/2025-12-23-cjs-dist-ghpages/tasks.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,4 @@
1010
- [x] Refine build config to remove hashed chunks from `dist` <!-- id: 14 -->
1111
- [x] Update `deploy.yml` to trigger on `main` branch <!-- id: 15 -->
1212
- [x] Ensure CI (Test, Lint, TypeCheck) runs on all branches <!-- id: 16 -->
13-
- [x] Archive `cjs-dist-ghpages` <!-- id: 17 -->
14-
- [ ] Git commit (excluding logs) <!-- id: 18 -->
15-
- [ ] Migrate `master` to `main` and set as default <!-- id: 19 -->
16-
- [ ] Close related Issue <!-- id: 20 -->
13+

openspec/specs/dev-server/spec.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ The development server MUST serve `index.html` when accessed at the root URL (`h
1111
- **When** I access `http://localhost:5173/`
1212
- **Then** I should see the application/demo page
1313

14+
### Requirement: Dev Server Root URL Access
15+
The development server MUST serve `index.html` when accessed at the root URL (`http://localhost:5173/`).
16+
17+
#### Scenario: Verify Root URL
18+
- **Given** I run `pnpm dev`
19+
- **When** I access `http://localhost:5173/`
20+
- **Then** I should see the application/demo page
21+

openspec/specs/packaging/spec.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,27 @@ The `dist` directory MUST NOT contain demo website files (e.g., `index.html`, `i
2727
- **Given** I run `pnpm build`
2828
- **Then** `dist/index.html` should NOT exist
2929

30+
### Requirement: Modern Packaging (ESM/UMD)
31+
The project SHALL NOT output CommonJS (CJS) files. The distribution MUST contain ESM modules and UMD bundles (for browser compatibility), along with TypeScript declaration files (`.d.ts`).
32+
33+
#### Scenario: Verify Build Output
34+
- **Given** I run `pnpm build`
35+
- **Then** the `dist` directory should contain `.js` files using ESM syntax
36+
- **And** it should contain `umd.js` files
37+
- **And** it should NOT contain `.cjs` files
38+
- **And** it should contain `.d.ts` files
39+
40+
### Requirement: Commit Dist Folder
41+
The `dist` directory MUST be committed to the git repository to allow direct installation from git.
42+
43+
#### Scenario: Verify Gitignore
44+
- **Given** I inspect `.gitignore`
45+
- **Then** `dist` or `dist/` should NOT be present
46+
47+
### Requirement: Clean Dist Output
48+
The `dist` directory MUST NOT contain demo website files (e.g., `index.html`, `index.css` related to the demo). It SHOULD only contain library assets.
49+
50+
#### Scenario: Verify Dist Config
51+
- **Given** I run `pnpm build`
52+
- **Then** `dist/index.html` should NOT exist
53+

0 commit comments

Comments
 (0)