mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
feat: interactive JSON / JSON5 mode selector at build time
Lets the operator pick between strict JSON (legacy) and JSON5 for every configuration file consumed by Nitro and the renderer. - scripts/configure-json.mjs: interactive prompt (JSON5 recommended), with --if-missing and --non-interactive flags for CI use - package.json: yarn configure / prestart / prebuild hooks - vite.config.mjs: reads .nitro-build.json (or NITRO_JSON_MODE env) and injects the compile-time constant __NITRO_JSON_MODE__ via define - src/bootstrap.ts: routes client-mode.json parsing through the selected mode - .gitignore: ignore the per-deployment .nitro-build.json - README: full usage and override section - public/configuration assets regenerated by the updated prebuild flow The renderer side (@nitrots/utils JsonParser) is updated in the companion Nitro_Render_V3 commit on the dev branch.
This commit is contained in:
+5
-3
@@ -4,9 +4,11 @@
|
||||
"homepage": ".",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"prebuild": "node scripts/write-asset-loader.mjs",
|
||||
"start": "vite --host",
|
||||
"build": "vite build && node scripts/minify-dist.mjs",
|
||||
"configure": "node scripts/configure-json.mjs",
|
||||
"prestart": "node scripts/configure-json.mjs --if-missing",
|
||||
"prebuild": "node scripts/configure-json.mjs --if-missing && node scripts/write-asset-loader.mjs",
|
||||
"start": "vite --base=/nitro/ --host",
|
||||
"build": "vite build --base=/nitro/ && node scripts/minify-dist.mjs",
|
||||
"build:prod": "npx browserslist@latest --update-db && yarn build",
|
||||
"eslint": "eslint ./src"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user