@manjunathhk/design-tokens 1.0.0 → 1.1.0-rc.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 +26 -0
- package/dist/_tokens.scss +1 -1
- package/dist/base.css +1 -1
- package/dist/fonts.css +1 -1
- package/dist/index.css +1 -1
- package/dist/stylelint.d.ts +5 -0
- package/dist/stylelint.mjs +8 -0
- package/dist/tokens.css +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.json +1 -1
- package/dist/tokens.mjs +2 -2
- package/package.json +13 -1
package/README.md
CHANGED
|
@@ -169,6 +169,32 @@ font-src 'self' https://design.manjunathhk.in;
|
|
|
169
169
|
Add `https://cdn.jsdelivr.net` to both directives only on a site that is
|
|
170
170
|
actively using the jsDelivr fallback above.
|
|
171
171
|
|
|
172
|
+
## Optional: shareable stylelint config
|
|
173
|
+
|
|
174
|
+
This package exports `@manjunathhk/design-tokens/stylelint` for consumer CSS.
|
|
175
|
+
Install `stylelint` in your own project, then extend this config:
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
npm install --save-dev stylelint
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"extends": ["stylelint-config-standard", "@manjunathhk/design-tokens/stylelint"]
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The shared rules reject:
|
|
188
|
+
|
|
189
|
+
- hex literals (`color-no-hex`);
|
|
190
|
+
- named colours (`color-named: "never"`);
|
|
191
|
+
- colour functions case-insensitively via `function-disallowed-list`:
|
|
192
|
+
`rgb`, `rgba`, `hsl`, `hsla`, `hwb`, `lab`, `lch`, `oklab`, `oklch`,
|
|
193
|
+
`color`, `color-mix`.
|
|
194
|
+
|
|
195
|
+
`color-mix()` is banned even with token arguments: derived colours belong in
|
|
196
|
+
tokens. `transparent`, `currentcolor` and system colours stay allowed.
|
|
197
|
+
|
|
172
198
|
## Versioning policy
|
|
173
199
|
|
|
174
200
|
Semantic versioning is what makes "change once, reflect everywhere" safe:
|
package/dist/_tokens.scss
CHANGED
package/dist/base.css
CHANGED
package/dist/fonts.css
CHANGED
package/dist/index.css
CHANGED
package/dist/tokens.css
CHANGED
package/dist/tokens.d.ts
CHANGED
package/dist/tokens.json
CHANGED
package/dist/tokens.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manjunathhk/design-tokens",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-rc.1",
|
|
4
4
|
"description": "Design tokens and a small opt-in base stylesheet shared by Manjunath's websites.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Manjunath Krishnasa",
|
|
@@ -28,12 +28,24 @@
|
|
|
28
28
|
"types": "./dist/tokens.d.ts",
|
|
29
29
|
"default": "./dist/tokens.mjs"
|
|
30
30
|
},
|
|
31
|
+
"./stylelint": {
|
|
32
|
+
"types": "./dist/stylelint.d.ts",
|
|
33
|
+
"default": "./dist/stylelint.mjs"
|
|
34
|
+
},
|
|
31
35
|
"./_tokens.scss": "./dist/_tokens.scss",
|
|
32
36
|
"./package.json": "./package.json"
|
|
33
37
|
},
|
|
34
38
|
"sideEffects": [
|
|
35
39
|
"*.css"
|
|
36
40
|
],
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"stylelint": ">=16"
|
|
43
|
+
},
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"stylelint": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
37
49
|
"publishConfig": {
|
|
38
50
|
"access": "public",
|
|
39
51
|
"provenance": true
|