nemcss 0.2.0 → 0.3.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 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# nemcss
|
|
2
2
|
|
|
3
|
-
> A design-token-driven CSS utility generator
|
|
3
|
+
> A design-token-driven CSS custom properties and utility class generator
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
# global
|
|
@@ -12,10 +12,20 @@ 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
|
-
`nemcss` reads your design tokens and a `nemcss.config.json` file, then generates CSS custom properties and utility classes. Add
|
|
15
|
+
`nemcss` reads your design tokens and a `nemcss.config.json` file, then generates CSS custom properties and utility classes. Add the following directives to your CSS input file:
|
|
16
|
+
|
|
17
|
+
```css
|
|
18
|
+
/* your CSS input file */
|
|
19
|
+
@nemcss base;
|
|
20
|
+
@nemcss utilities;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`@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.
|
|
16
24
|
|
|
17
25
|
## CLI commands
|
|
18
26
|
|
|
27
|
+
Run `nemcss init` to scaffold a `nemcss.config.json` and example token files, then use `build` or `watch` to generate your CSS.
|
|
28
|
+
|
|
19
29
|
| Command | Description |
|
|
20
30
|
| ------------------------------------- | ------------------------------------------------------------------------------ |
|
|
21
31
|
| `nemcss init` | Scaffold `nemcss.config.json` and example token files in the current directory |
|
|
@@ -42,4 +52,17 @@ A minimal `nemcss.config.json`:
|
|
|
42
52
|
}
|
|
43
53
|
```
|
|
44
54
|
|
|
45
|
-
For the full configuration reference, see the [
|
|
55
|
+
For the full configuration reference, see the [documentation](https://liv7c.github.io/nemcss).
|
|
56
|
+
|
|
57
|
+
## Integrations
|
|
58
|
+
|
|
59
|
+
If you use Vite or PostCSS, you can use a plugin instead of the standalone CLI:
|
|
60
|
+
|
|
61
|
+
- [`@nemcss/vite`](https://www.npmjs.com/package/@nemcss/vite): Vite plugin with HMR support
|
|
62
|
+
- [`@nemcss/postcss`](https://www.npmjs.com/package/@nemcss/postcss): PostCSS plugin
|
|
63
|
+
|
|
64
|
+
See the [integrations documentation](https://liv7c.github.io/nemcss/integrations/cli.html) for setup guides.
|
|
65
|
+
|
|
66
|
+
## Editor support
|
|
67
|
+
|
|
68
|
+
The [NemCSS VS Code extension](https://marketplace.visualstudio.com/items?itemName=liv7c.nemcss) provides autocomplete and hover docs for your tokens and utility classes via the built-in LSP.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nemcss",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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-darwin-arm64": "0.
|
|
31
|
-
"@nemcss/cli-darwin-x64": "0.
|
|
32
|
-
"@nemcss/cli-linux-x64": "0.
|
|
33
|
-
"@nemcss/cli-linux-arm64": "0.
|
|
34
|
-
"@nemcss/cli-win32-x64": "0.
|
|
30
|
+
"@nemcss/cli-darwin-arm64": "0.3.0",
|
|
31
|
+
"@nemcss/cli-darwin-x64": "0.3.0",
|
|
32
|
+
"@nemcss/cli-linux-x64": "0.3.0",
|
|
33
|
+
"@nemcss/cli-linux-arm64": "0.3.0",
|
|
34
|
+
"@nemcss/cli-win32-x64": "0.3.0"
|
|
35
35
|
}
|
|
36
36
|
}
|