@master/create-css 2.0.0 → 2.0.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.
package/README.md CHANGED
@@ -32,7 +32,7 @@ Without `--mode`, the installer configures static rendering. Use `--mode <mode>`
32
32
  npm create @master/css@latest -- --framework nextjs --mode static --yes
33
33
  ```
34
34
 
35
- Supported `--mode` values are `runtime`, `static`, `progressive`, and `pre-render`. All four modes are supported for `vite`, `react`, `react-router`, `tanstack-start`, `vue`, `nextjs`, `nuxt`, `astro`, `webpack`, `rspack`, `rsbuild`, and `lit`. `laravel` supports `static` only; `angular` and `none` support `static` and `runtime`. SvelteKit setup is delegated to the Svelte CLI add-on and does not accept `--mode` here.
35
+ The installer accepts `static`, `runtime`, `prerender`, and `progressive` for `vite`, `react`, `react-router`, `tanstack-start`, `vue`, `nextjs`, `nuxt`, `astro`, `webpack`, `rspack`, `rsbuild`, and `lit`. The [rendering modes guide](https://css.master.co/guide/rendering-modes) explains where each integration generates CSS. `laravel` accepts `static` only; `angular` and `none` accept `static` and `runtime`. SvelteKit setup is delegated to the Svelte CLI add-on and does not accept `--mode` here.
36
36
 
37
37
  If you do not have a project yet, create one first:
38
38
 
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MASTER_CSS_VERSION } from "./constants.js";
2
- import { formatRenderingModes, isRenderingMode } from "./modes.js";
2
+ import { formatRenderingModes, resolveRenderingMode } from "./modes.js";
3
3
  import { applyMasterCSSSetupPlan, planMasterCSSSetup } from "./index.js";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  import { dirname, join, resolve } from "node:path";
@@ -101,8 +101,11 @@ function shouldPrompt(options) {
101
101
  return !options.yes && !options.json && !options.dryRun && Boolean(process.stdin.isTTY) && Boolean(process.stdout.isTTY);
102
102
  }
103
103
  function parseRenderingModeOption(value) {
104
- if (isRenderingMode(value)) return value;
105
- throw new InvalidArgumentError(`Invalid rendering mode "${value}". Supported modes: ${formatRenderingModes()}.`);
104
+ try {
105
+ return resolveRenderingMode(value);
106
+ } catch {
107
+ throw new InvalidArgumentError(`Invalid rendering mode "${value}". Supported modes: ${formatRenderingModes()}.`);
108
+ }
106
109
  }
107
110
  function createTTYPrompt() {
108
111
  const input = process.stdin;
package/dist/modes.js CHANGED
@@ -8,6 +8,7 @@ function formatRenderingModes() {
8
8
  }
9
9
  function resolveRenderingMode(value) {
10
10
  if (value === void 0) return void 0;
11
+ if (value === "pre-render") return "prerender";
11
12
  if (isRenderingMode(value)) return value;
12
13
  throw new Error(`Invalid rendering mode "${String(value)}". Supported modes: ${formatRenderingModes()}.`);
13
14
  }
package/package.json CHANGED
@@ -48,9 +48,9 @@
48
48
  "provenance": true
49
49
  },
50
50
  "dependencies": {
51
- "@master/css-schema": "2.0.0",
51
+ "@master/css-schema": "2.0.1",
52
52
  "commander": "^15.0.0"
53
53
  },
54
- "version": "2.0.0",
55
- "gitHead": "6bf9adc4432b67e62613caea59d3b554711b4d54"
54
+ "version": "2.0.1",
55
+ "gitHead": "76012032a62d59365419b6acb74781d62f003874"
56
56
  }