nemcss 0.3.0 → 0.6.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 +1 -0
- package/package.json +6 -6
- package/schemas/nemcss.config.schema.json +0 -138
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ Run `nemcss init` to scaffold a `nemcss.config.json` and example token files, th
|
|
|
31
31
|
| `nemcss init` | Scaffold `nemcss.config.json` and example token files in the current directory |
|
|
32
32
|
| `nemcss build -i <input> -o <output>` | One-shot build: scan content files and write CSS |
|
|
33
33
|
| `nemcss watch -i <input> -o <output>` | Watch mode: rebuild on token, content, or config changes |
|
|
34
|
+
| `nemcss schema` | Print the JSON schema for `nemcss.config.json` to stdout |
|
|
34
35
|
|
|
35
36
|
## Configuration
|
|
36
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nemcss",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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.6.0",
|
|
31
|
+
"@nemcss/cli-darwin-x64": "0.6.0",
|
|
32
|
+
"@nemcss/cli-linux-x64": "0.6.0",
|
|
33
|
+
"@nemcss/cli-linux-arm64": "0.6.0",
|
|
34
|
+
"@nemcss/cli-win32-x64": "0.6.0"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "NemCSS Configuration",
|
|
4
|
-
"description": "Configuration file for the NemCSS utility CSS generator",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"content": {
|
|
8
|
-
"type": "array",
|
|
9
|
-
"items": { "type": "string" },
|
|
10
|
-
"description": "Glob patterns for content files to scan for used classes",
|
|
11
|
-
"examples": [["src/**/*.html", "src/**/*.tsx"]]
|
|
12
|
-
},
|
|
13
|
-
"tokensDir": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"default": "design-tokens",
|
|
16
|
-
"description": "Directory containing design token JSON files"
|
|
17
|
-
},
|
|
18
|
-
"theme": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"description": "Primitive design token sources. Each key is a token group name.",
|
|
21
|
-
"defaultSnippets": [
|
|
22
|
-
{
|
|
23
|
-
"label": "Token group",
|
|
24
|
-
"description": "Add a token group, e.g colors or spacings",
|
|
25
|
-
"body": {
|
|
26
|
-
"${1:groupName}": {
|
|
27
|
-
"source": "${2:design-tokens/tokens.json}",
|
|
28
|
-
"prefix": "${3:prefix}"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"additionalProperties": {
|
|
34
|
-
"type": "object",
|
|
35
|
-
"required": ["source"],
|
|
36
|
-
"defaultSnippets": [
|
|
37
|
-
{
|
|
38
|
-
"label": "Token group config",
|
|
39
|
-
"body": {
|
|
40
|
-
"source": "${1:design-tokens/tokens.json}",
|
|
41
|
-
"prefix": "${2:prefix}"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"properties": {
|
|
46
|
-
"source": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"description": "Path to the token JSON file, relative to nemcss.config.json"
|
|
49
|
-
},
|
|
50
|
-
"prefix": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "CSS custom property prefix for this token group"
|
|
53
|
-
},
|
|
54
|
-
"utilities": {
|
|
55
|
-
"type": "array",
|
|
56
|
-
"description": "Utility classes to generate for every token in this group",
|
|
57
|
-
"items": {
|
|
58
|
-
"type": "object",
|
|
59
|
-
"required": ["prefix", "property"],
|
|
60
|
-
"defaultSnippets": [
|
|
61
|
-
{
|
|
62
|
-
"label": "Utility",
|
|
63
|
-
"body": {
|
|
64
|
-
"prefix": "${1:p}",
|
|
65
|
-
"property": "${2:padding}"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"properties": {
|
|
70
|
-
"prefix": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"description": "CSS class prefix for this utility",
|
|
73
|
-
"minLength": 1
|
|
74
|
-
},
|
|
75
|
-
"property": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"description": "CSS property to set",
|
|
78
|
-
"minLength": 1
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"additionalProperties": false
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"additionalProperties": false
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"semantic": {
|
|
89
|
-
"type": "object",
|
|
90
|
-
"description": "Semantic token groups. Each key becomes both a CSS custom property prefix and a utility class prefix.",
|
|
91
|
-
"defaultSnippets": [
|
|
92
|
-
{
|
|
93
|
-
"label": "Semantic group",
|
|
94
|
-
"description": "Add a semantic group, e.g text, bg or border",
|
|
95
|
-
"body": {
|
|
96
|
-
"${1:groupName}": {
|
|
97
|
-
"property": "${2:color}",
|
|
98
|
-
"tokens": {
|
|
99
|
-
"${3:tokenName}": "{${4:colors}.${5:variant}}"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"additionalProperties": {
|
|
106
|
-
"type": "object",
|
|
107
|
-
"required": ["property", "tokens"],
|
|
108
|
-
"defaultSnippets": [
|
|
109
|
-
{
|
|
110
|
-
"label": "Semantic group config",
|
|
111
|
-
"body": {
|
|
112
|
-
"property": "${1:color}",
|
|
113
|
-
"tokens": {
|
|
114
|
-
"${2:tokenName}": "{${3:colors}.${4:variant}}"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
"properties": {
|
|
120
|
-
"property": {
|
|
121
|
-
"type": "string",
|
|
122
|
-
"description": "CSS property for this utility group",
|
|
123
|
-
"minLength": 1
|
|
124
|
-
},
|
|
125
|
-
"tokens": {
|
|
126
|
-
"type": "object",
|
|
127
|
-
"description": "Semantic name to primitive token reference. Each entry generates a CSS custom property and a utility class.",
|
|
128
|
-
"additionalProperties": {
|
|
129
|
-
"type": "string",
|
|
130
|
-
"pattern": "^\\{[^.{}]+\\.[^.{}]+\\}$"
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"additionalProperties": false
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|