css-typed-vars 0.4.4 → 0.4.5
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 +3 -3
- package/dist/cli.cjs +2 -1
- package/dist/cli.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,17 +114,17 @@ npx css-typed-vars --input "src/styles/**/*.{css,scss}" --output src/cssVars.ts
|
|
|
114
114
|
npx css-typed-vars --input "src/**/*.css" --output src/cssVars.ts --exclude "**/vendor/**"
|
|
115
115
|
npx css-typed-vars --input "src/**/*.css" --output src/cssVars.ts --prefix theme --naming snake
|
|
116
116
|
npx css-typed-vars --input "src/**/*.css" --output src/cssVars.js # generates .js + .d.ts
|
|
117
|
-
npx css-typed-vars --input "src/**/*.css" --output src/cssVars.ts --selector ".dark"
|
|
117
|
+
npx css-typed-vars --input "src/**/*.css" --output src/cssVars.ts --selector ".dark" --selector "[data-theme='dark']"
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
| Flag | Description |
|
|
121
121
|
|------|-------------|
|
|
122
|
-
| `--input` | Glob pattern for CSS/SCSS/Less files |
|
|
122
|
+
| `--input` | Glob pattern for CSS/SCSS/Less files (repeatable: `--input "src/**/*.css" --input "lib/**/*.css"`) |
|
|
123
123
|
| `--output` | Output file. `.ts` → TypeScript, `.js` → JavaScript + `.d.ts` alongside |
|
|
124
124
|
| `--exclude` | Glob pattern for files to exclude (repeatable: `--exclude "**/a/**" --exclude "**/b/**"`) |
|
|
125
125
|
| `--prefix` | Prefix for generated keys: `--prefix theme` → `themeColorPrimary` |
|
|
126
126
|
| `--naming` | Key naming: `camelCase` (default), `snake`, `kebab` |
|
|
127
|
-
| `--selector` | Extra CSS selector to scan for variables (
|
|
127
|
+
| `--selector` | Extra CSS selector to scan for variables (repeatable: `--selector ".dark" --selector "[data-theme='dark']"`) |
|
|
128
128
|
| `--watch` | Watch for file changes and regenerate |
|
|
129
129
|
| `--version`, `-v` | Print the version number and exit |
|
|
130
130
|
|
package/dist/cli.cjs
CHANGED
|
@@ -199,7 +199,8 @@ async function main() {
|
|
|
199
199
|
process.exit(0);
|
|
200
200
|
}
|
|
201
201
|
const config = await loadConfig();
|
|
202
|
-
const
|
|
202
|
+
const inputArgs = getArgs("--input");
|
|
203
|
+
const input = inputArgs.length > 0 ? inputArgs : config.input;
|
|
203
204
|
const output = getArg("--output") ?? config.output;
|
|
204
205
|
const excludeArgs = getArgs("--exclude");
|
|
205
206
|
const exclude = excludeArgs.length > 0 ? excludeArgs : config.exclude;
|
package/dist/cli.js
CHANGED
|
@@ -54,7 +54,8 @@ async function main() {
|
|
|
54
54
|
process.exit(0);
|
|
55
55
|
}
|
|
56
56
|
const config = await loadConfig();
|
|
57
|
-
const
|
|
57
|
+
const inputArgs = getArgs("--input");
|
|
58
|
+
const input = inputArgs.length > 0 ? inputArgs : config.input;
|
|
58
59
|
const output = getArg("--output") ?? config.output;
|
|
59
60
|
const excludeArgs = getArgs("--exclude");
|
|
60
61
|
const exclude = excludeArgs.length > 0 ? excludeArgs : config.exclude;
|