nemcss 0.8.1 → 0.9.0
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 +26 -9
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -12,7 +12,16 @@ npm install -D nemcss
|
|
|
12
12
|
|
|
13
13
|
When installed locally, run commands via `npx nemcss <command>` or add them as scripts in your `package.json`.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npx nemcss init
|
|
19
|
+
npx nemcss new-token-file colors --prefix color --values "hsl(0, 0%, 100%),hsl(0, 0%, 0%)" --names "white,black"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`init` creates `nemcss.config.json` and an empty `design-tokens/` folder. `new-token-file` creates a token file and registers it in the config in one step.
|
|
23
|
+
|
|
24
|
+
Add the directives to your CSS input file:
|
|
16
25
|
|
|
17
26
|
```css
|
|
18
27
|
/* your CSS input file */
|
|
@@ -22,16 +31,21 @@ When installed locally, run commands via `npx nemcss <command>` or add them as s
|
|
|
22
31
|
|
|
23
32
|
`@nemcss base;` is replaced with a `:root {}` block of CSS custom properties. `@nemcss utilities;` is replaced with the utility classes used in your content files. The `utilities` directive is optional.
|
|
24
33
|
|
|
25
|
-
|
|
34
|
+
Then build:
|
|
26
35
|
|
|
27
|
-
|
|
36
|
+
```sh
|
|
37
|
+
npx nemcss build -i src/styles.css -o dist/styles.css
|
|
38
|
+
```
|
|
28
39
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
| `nemcss
|
|
34
|
-
| `nemcss
|
|
40
|
+
## CLI commands
|
|
41
|
+
|
|
42
|
+
| Command | Description |
|
|
43
|
+
| --------------------------------------- | ---------------------------------------------------------------------------- |
|
|
44
|
+
| `nemcss init` | Create a minimal `nemcss.config.json` and an empty `design-tokens/` folder |
|
|
45
|
+
| `nemcss new-token-file <name>` | Create a token file and register it in the config |
|
|
46
|
+
| `nemcss build -i <input> -o <output>` | One-shot build: scan content files and write CSS |
|
|
47
|
+
| `nemcss watch -i <input> -o <output>` | Watch mode: rebuild on token, content, or config changes |
|
|
48
|
+
| `nemcss schema` | Print the JSON schema for `nemcss.config.json` to stdout |
|
|
35
49
|
|
|
36
50
|
## Configuration
|
|
37
51
|
|
|
@@ -44,6 +58,7 @@ A minimal `nemcss.config.json`:
|
|
|
44
58
|
"theme": {
|
|
45
59
|
"colors": {
|
|
46
60
|
"source": "design-tokens/colors.json",
|
|
61
|
+
"prefix": "color",
|
|
47
62
|
"utilities": [
|
|
48
63
|
{ "prefix": "text", "property": "color" },
|
|
49
64
|
{ "prefix": "bg", "property": "background-color" }
|
|
@@ -53,6 +68,8 @@ A minimal `nemcss.config.json`:
|
|
|
53
68
|
}
|
|
54
69
|
```
|
|
55
70
|
|
|
71
|
+
Every token file must be registered under `theme` with an explicit `prefix`, like `colors` above. `new-token-file` handles this for you.
|
|
72
|
+
|
|
56
73
|
For the full configuration reference, see the [documentation](https://liv7c.github.io/nemcss).
|
|
57
74
|
|
|
58
75
|
## Integrations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nemcss",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Command-line interface for nemcss, a design-token-driven CSS utility generator",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"schemas"
|
|
28
28
|
],
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@nemcss/cli-
|
|
31
|
-
"@nemcss/cli-win32-x64": "0.
|
|
32
|
-
"@nemcss/cli-linux-
|
|
33
|
-
"@nemcss/cli-darwin-arm64": "0.
|
|
34
|
-
"@nemcss/cli-
|
|
30
|
+
"@nemcss/cli-linux-x64": "0.9.0",
|
|
31
|
+
"@nemcss/cli-win32-x64": "0.9.0",
|
|
32
|
+
"@nemcss/cli-linux-arm64": "0.9.0",
|
|
33
|
+
"@nemcss/cli-darwin-arm64": "0.9.0",
|
|
34
|
+
"@nemcss/cli-darwin-x64": "0.9.0"
|
|
35
35
|
}
|
|
36
36
|
}
|