@rm-industries/create-forge 0.3.0-alpha.0 → 0.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/index.mjs +31 -3
  2. package/dist/index.mjs.map +1 -1
  3. package/dist/template/.github/actions/setup-project/action.yml +24 -0
  4. package/dist/template/.github/dependabot.yml +45 -0
  5. package/dist/template/.github/workflows/automation.yml +59 -0
  6. package/dist/template/.github/workflows/project.yml +235 -0
  7. package/dist/template/.github/workflows/security.yml +70 -0
  8. package/dist/template/.gitignore.template +261 -0
  9. package/dist/template/.lighthouserc.json +28 -0
  10. package/dist/template/README.md +121 -22
  11. package/dist/template/audit-ci.jsonc +20 -0
  12. package/dist/template/cspell.config.ts +19 -2
  13. package/dist/template/docs/accessibility-checklist.md +50 -0
  14. package/dist/template/docs/performance-budget.md +68 -0
  15. package/dist/template/package-lock.json +5663 -390
  16. package/dist/template/package.json +19 -6
  17. package/dist/template/playwright.config.ts +9 -3
  18. package/dist/template/scripts/validate-build.test.ts +58 -0
  19. package/dist/template/scripts/validate-build.ts +64 -0
  20. package/dist/template/src/config/content-models/registry.test.ts +14 -0
  21. package/dist/template/src/config/site.test.ts +13 -0
  22. package/dist/template/src/content.config.test.ts +8 -0
  23. package/dist/template/src/integrations/sveltia/previews.test.ts +23 -0
  24. package/dist/template/src/lib/articles.test.ts +43 -0
  25. package/dist/template/src/lib/articles.ts +1 -1
  26. package/dist/template/src/lib/navigation.test.ts +2 -0
  27. package/dist/template/src/styles/global.css +7 -1
  28. package/dist/template/stylelint.config.ts +2 -0
  29. package/dist/template/tests/accessibility.spec.ts +56 -10
  30. package/dist/template/tests/navigation.spec.ts +43 -0
  31. package/dist/template/tests/routes.spec.ts +19 -12
  32. package/dist/template/vitest.config.ts +18 -1
  33. package/package.json +1 -1
@@ -0,0 +1,235 @@
1
+ ---
2
+ name: Project Continuous Integration
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ pull_request:
6
+ branches:
7
+ - main
8
+ push:
9
+ branches:
10
+ - main
11
+
12
+ permissions: {}
13
+
14
+ concurrency:
15
+ group: ${{ github.workflow }}-${{ github.ref }}
16
+ cancel-in-progress: true
17
+
18
+ defaults:
19
+ run:
20
+ shell: bash
21
+
22
+ jobs:
23
+ format:
24
+ name: Format
25
+ runs-on: ubuntu-latest
26
+
27
+ permissions:
28
+ contents: read
29
+
30
+ steps:
31
+ - name: Checkout repository
32
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
33
+ with:
34
+ persist-credentials: false
35
+
36
+ - name: Setup project
37
+ uses: ./.github/actions/setup-project
38
+ with:
39
+ node-version: '26.x'
40
+
41
+ - name: Check formatting
42
+ run: npm run format
43
+
44
+ spellcheck:
45
+ name: Spellcheck
46
+ runs-on: ubuntu-latest
47
+
48
+ permissions:
49
+ contents: read
50
+
51
+ steps:
52
+ - name: Checkout repository
53
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
54
+ with:
55
+ persist-credentials: false
56
+
57
+ - name: Setup project
58
+ uses: ./.github/actions/setup-project
59
+ with:
60
+ node-version: '26.x'
61
+
62
+ - name: Check spelling
63
+ run: npm run spellcheck
64
+
65
+ static-quality:
66
+ name: Static quality
67
+ runs-on: ubuntu-latest
68
+
69
+ permissions:
70
+ contents: read
71
+
72
+ steps:
73
+ - name: Checkout repository
74
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
75
+ with:
76
+ persist-credentials: false
77
+
78
+ - name: Setup project
79
+ uses: ./.github/actions/setup-project
80
+ with:
81
+ node-version: '26.x'
82
+
83
+ - name: Run remaining static quality checks
84
+ run: npm run quality:static:ci
85
+
86
+ unit-tests:
87
+ name: Unit tests and coverage
88
+ runs-on: ubuntu-latest
89
+
90
+ permissions:
91
+ contents: read
92
+
93
+ steps:
94
+ - name: Checkout repository
95
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
96
+ with:
97
+ persist-credentials: false
98
+
99
+ - name: Setup project
100
+ uses: ./.github/actions/setup-project
101
+ with:
102
+ node-version: '26.x'
103
+
104
+ - name: Run unit tests with coverage
105
+ run: npm run test:coverage
106
+
107
+ - name: Upload coverage report
108
+ if: always()
109
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
110
+ with:
111
+ name: unit-coverage
112
+ path: coverage
113
+ if-no-files-found: error
114
+ retention-days: 7
115
+
116
+ build:
117
+ name: Production build
118
+ needs:
119
+ - format
120
+ - spellcheck
121
+ - static-quality
122
+ runs-on: ubuntu-latest
123
+
124
+ permissions:
125
+ contents: read
126
+
127
+ steps:
128
+ - name: Checkout repository
129
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
130
+ with:
131
+ persist-credentials: false
132
+
133
+ - name: Setup project
134
+ uses: ./.github/actions/setup-project
135
+ with:
136
+ node-version: '26.x'
137
+
138
+ - name: Build project
139
+ run: npm run build
140
+
141
+ - name: Validate generated output
142
+ run: npm run validate:build
143
+
144
+ - name: Upload production build
145
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
146
+ with:
147
+ name: site-build
148
+ path: dist
149
+ if-no-files-found: error
150
+ retention-days: 7
151
+
152
+ browser-tests:
153
+ name: Browser and accessibility tests
154
+ runs-on: ubuntu-latest
155
+
156
+ permissions:
157
+ contents: read
158
+
159
+ steps:
160
+ - name: Checkout repository
161
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
162
+ with:
163
+ persist-credentials: false
164
+
165
+ - name: Setup project
166
+ uses: ./.github/actions/setup-project
167
+ with:
168
+ node-version: '26.x'
169
+
170
+ - name: Install Chromium
171
+ run: npx playwright install --with-deps chromium
172
+
173
+ - name: Run browser and accessibility tests
174
+ run: npm run test:e2e
175
+
176
+ - name: Upload browser failure evidence
177
+ if: failure()
178
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
179
+ with:
180
+ name: browser-test-failures
181
+ path: |
182
+ playwright-report
183
+ test-results
184
+ if-no-files-found: error
185
+ retention-days: 7
186
+
187
+ lighthouse:
188
+ name: Lighthouse budgets
189
+ runs-on: ubuntu-latest
190
+
191
+ permissions:
192
+ contents: read
193
+
194
+ steps:
195
+ - name: Checkout repository
196
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
197
+ with:
198
+ persist-credentials: false
199
+
200
+ - name: Setup project
201
+ uses: ./.github/actions/setup-project
202
+ with:
203
+ node-version: '26.x'
204
+
205
+ - name: Enforce Lighthouse budgets
206
+ run: npm run lighthouse:ci
207
+
208
+ - name: Upload Lighthouse reports
209
+ if: always()
210
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
211
+ with:
212
+ name: lighthouse-reports
213
+ path: .lighthouseci
214
+ include-hidden-files: true
215
+ if-no-files-found: error
216
+ retention-days: 7
217
+
218
+ project:
219
+ name: Project
220
+ needs:
221
+ - format
222
+ - spellcheck
223
+ - static-quality
224
+ - unit-tests
225
+ - build
226
+ - browser-tests
227
+ - lighthouse
228
+ runs-on: ubuntu-latest
229
+
230
+ permissions:
231
+ contents: read
232
+
233
+ steps:
234
+ - name: Confirm project checks
235
+ run: echo "All project checks passed."
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: Security Analysis
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ pull_request:
6
+ branches:
7
+ - main
8
+ push:
9
+ branches:
10
+ - main
11
+ schedule:
12
+ - cron: '__RM_INDUSTRIES_FORGE_TEMPLATE_V1_SECURITY_SCHEDULE_MINUTE__ 5 * * 1'
13
+
14
+ permissions: {}
15
+
16
+ concurrency:
17
+ group: ${{ github.workflow }}-${{ github.ref }}
18
+ cancel-in-progress: true
19
+
20
+ jobs:
21
+ code-analysis:
22
+ name: Analyze (${{ matrix.language }})
23
+ runs-on: ubuntu-latest
24
+
25
+ permissions:
26
+ actions: read
27
+ contents: read
28
+ security-events: write
29
+
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ language:
34
+ - actions
35
+ - javascript-typescript
36
+
37
+ steps:
38
+ - name: Checkout repository
39
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
40
+ with:
41
+ persist-credentials: false
42
+
43
+ - name: Initialize CodeQL
44
+ uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
45
+ with:
46
+ build-mode: none
47
+ languages: ${{ matrix.language }}
48
+ queries: security-extended,security-and-quality
49
+
50
+ - name: Perform CodeQL analysis
51
+ uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
52
+
53
+ dependency-review:
54
+ name: Review dependencies
55
+ if: github.event_name == 'pull_request'
56
+ runs-on: ubuntu-latest
57
+
58
+ permissions:
59
+ contents: read
60
+
61
+ steps:
62
+ - name: Checkout repository
63
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
64
+ with:
65
+ persist-credentials: false
66
+
67
+ - name: Review dependency changes
68
+ uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5
69
+ with:
70
+ fail-on-severity: high
@@ -0,0 +1,261 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/vim,node,astro,linux,macos,windows,visualstudiocode
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=vim,node,astro,linux,macos,windows,visualstudiocode
3
+
4
+ ### Astro ###
5
+ # Gitignore template for Astro projects
6
+ # Ignore content collection generated files
7
+ .astro
8
+
9
+ ### Linux ###
10
+ *~
11
+
12
+ # temporary files which can be created if a process still has a handle open of a deleted file
13
+ .fuse_hidden*
14
+
15
+ # KDE directory preferences
16
+ .directory
17
+
18
+ # Linux trash folder which might appear on any partition or disk
19
+ .Trash-*
20
+
21
+ # .nfs files are created when an open file is removed but is still being accessed
22
+ .nfs*
23
+
24
+ ### macOS ###
25
+ # General
26
+ .DS_Store
27
+ .AppleDouble
28
+ .LSOverride
29
+
30
+ # Icon must end with two \r
31
+ Icon
32
+
33
+ # Thumbnails
34
+ ._*
35
+
36
+ # Files that might appear in the root of a volume
37
+ .DocumentRevisions-V100
38
+ .fseventsd
39
+ .Spotlight-V100
40
+ .TemporaryItems
41
+ .Trashes
42
+ .VolumeIcon.icns
43
+ .com.apple.timemachine.donotpresent
44
+
45
+ # Directories potentially created on remote AFP share
46
+ .AppleDB
47
+ .AppleDesktop
48
+ Network Trash Folder
49
+ Temporary Items
50
+ .apdisk
51
+
52
+ ### macOS Patch ###
53
+ # iCloud generated files
54
+ *.icloud
55
+
56
+ ### Node ###
57
+ # Logs
58
+ logs
59
+ *.log
60
+ npm-debug.log*
61
+ yarn-debug.log*
62
+ yarn-error.log*
63
+ lerna-debug.log*
64
+ .pnpm-debug.log*
65
+
66
+ # Diagnostic reports (https://nodejs.org/api/report.html)
67
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
68
+
69
+ # Runtime data
70
+ pids
71
+ *.pid
72
+ *.seed
73
+ *.pid.lock
74
+
75
+ # Directory for instrumented libs generated by jscoverage/JSCover
76
+ lib-cov
77
+
78
+ # Coverage directory used by tools like istanbul
79
+ coverage
80
+ *.lcov
81
+
82
+ # nyc test coverage
83
+ .nyc_output
84
+
85
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
86
+ .grunt
87
+
88
+ # Bower dependency directory (https://bower.io/)
89
+ bower_components
90
+
91
+ # node-waf configuration
92
+ .lock-wscript
93
+
94
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
95
+ build/Release
96
+
97
+ # Dependency directories
98
+ node_modules/
99
+ jspm_packages/
100
+
101
+ # Snowpack dependency directory (https://snowpack.dev/)
102
+ web_modules/
103
+
104
+ # TypeScript cache
105
+ *.tsbuildinfo
106
+
107
+ # Optional npm cache directory
108
+ .npm
109
+
110
+ # Optional eslint cache
111
+ .eslintcache
112
+
113
+ # Optional stylelint cache
114
+ .stylelintcache
115
+
116
+ # Microbundle cache
117
+ .rpt2_cache/
118
+ .rts2_cache_cjs/
119
+ .rts2_cache_es/
120
+ .rts2_cache_umd/
121
+
122
+ # Optional REPL history
123
+ .node_repl_history
124
+
125
+ # Output of 'npm pack'
126
+ *.tgz
127
+
128
+ # Yarn Integrity file
129
+ .yarn-integrity
130
+
131
+ # dotenv environment variable files
132
+ .env
133
+ .env.development.local
134
+ .env.test.local
135
+ .env.production.local
136
+ .env.local
137
+
138
+ # parcel-bundler cache (https://parceljs.org/)
139
+ .cache
140
+ .parcel-cache
141
+
142
+ # Next.js build output
143
+ .next
144
+ out
145
+
146
+ # Nuxt.js build / generate output
147
+ .nuxt
148
+ dist
149
+
150
+ # Gatsby files
151
+ .cache/
152
+ # Comment in the public line in if your project uses Gatsby and not Next.js
153
+ # https://nextjs.org/blog/next-9-1#public-directory-support
154
+ # public
155
+
156
+ # vuepress build output
157
+ .vuepress/dist
158
+
159
+ # vuepress v2.x temp and cache directory
160
+ .temp
161
+
162
+ # Docusaurus cache and generated files
163
+ .docusaurus
164
+
165
+ # Serverless directories
166
+ .serverless/
167
+
168
+ # FuseBox cache
169
+ .fusebox/
170
+
171
+ # DynamoDB Local files
172
+ .dynamodb/
173
+
174
+ # TernJS port file
175
+ .tern-port
176
+
177
+ # Stores VSCode versions used for testing VSCode extensions
178
+ .vscode-test
179
+
180
+ # yarn v2
181
+ .yarn/cache
182
+ .yarn/unplugged
183
+ .yarn/build-state.yml
184
+ .yarn/install-state.gz
185
+ .pnp.*
186
+
187
+ ### Node Patch ###
188
+ # Serverless Webpack directories
189
+ .webpack/
190
+
191
+ # Optional stylelint cache
192
+
193
+ # SvelteKit build / generate output
194
+ .svelte-kit
195
+
196
+ ### Vim ###
197
+ # Swap
198
+ [._]*.s[a-v][a-z]
199
+ !*.svg # comment out if you don't need vector files
200
+ [._]*.sw[a-p]
201
+ [._]s[a-rt-v][a-z]
202
+ [._]ss[a-gi-z]
203
+ [._]sw[a-p]
204
+
205
+ # Session
206
+ Session.vim
207
+ Sessionx.vim
208
+
209
+ # Temporary
210
+ .netrwhist
211
+ # Auto-generated tag files
212
+ tags
213
+ # Persistent undo
214
+ [._]*.un~
215
+
216
+ ### VisualStudioCode ###
217
+ .vscode/*
218
+ !.vscode/settings.json
219
+ !.vscode/tasks.json
220
+ !.vscode/launch.json
221
+ !.vscode/extensions.json
222
+ !.vscode/*.code-snippets
223
+
224
+ # Local History for Visual Studio Code
225
+ .history/
226
+
227
+ # Built Visual Studio Code Extensions
228
+ *.vsix
229
+
230
+ ### VisualStudioCode Patch ###
231
+ # Ignore all local history of files
232
+ .history
233
+ .ionide
234
+
235
+ ### Windows ###
236
+ # Windows thumbnail cache files
237
+ Thumbs.db
238
+ Thumbs.db:encryptable
239
+ ehthumbs.db
240
+ ehthumbs_vista.db
241
+
242
+ # Dump file
243
+ *.stackdump
244
+
245
+ # Folder config file
246
+ [Dd]esktop.ini
247
+
248
+ # Recycle Bin used on file shares
249
+ $RECYCLE.BIN/
250
+
251
+ # Windows Installer files
252
+ *.cab
253
+ *.msi
254
+ *.msix
255
+ *.msm
256
+ *.msp
257
+
258
+ # Windows shortcuts
259
+ *.lnk
260
+
261
+ # End of https://www.toptal.com/developers/gitignore/api/vim,node,astro,linux,macos,windows,visualstudiocode
@@ -0,0 +1,28 @@
1
+ {
2
+ "ci": {
3
+ "collect": {
4
+ "staticDistDir": "./dist",
5
+ "url": [
6
+ "http://localhost/",
7
+ "http://localhost/articles/",
8
+ "http://localhost/articles/designing-a-calm-starting-point/"
9
+ ],
10
+ "numberOfRuns": 3
11
+ },
12
+ "assert": {
13
+ "aggregationMethod": "median",
14
+ "assertions": {
15
+ "categories:performance": ["error", { "minScore": 0.9 }],
16
+ "categories:accessibility": ["error", { "minScore": 1 }],
17
+ "categories:best-practices": ["error", { "minScore": 0.95 }],
18
+ "categories:seo": ["error", { "minScore": 0.95 }],
19
+ "resource-summary:script:size": ["error", { "maxNumericValue": 0 }],
20
+ "resource-summary:total:size": ["error", { "maxNumericValue": 125000 }]
21
+ }
22
+ },
23
+ "upload": {
24
+ "target": "filesystem",
25
+ "outputDir": ".lighthouseci"
26
+ }
27
+ }
28
+ }