@norges-domstoler/dds-design-tokens 3.0.2 → 3.0.3

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -4
  3. package/package.json +11 -13
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Norges domstoler
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -27,7 +27,7 @@ Referanse-tokens (OBS! under arbeid) bruker base-tokens til å definere logikk f
27
27
  ## 📦 Installasjon
28
28
 
29
29
  ```sh
30
- npm install @norges-domstoler/dds-design-tokens
30
+ pnpm add @norges-domstoler/dds-design-tokens
31
31
  ```
32
32
 
33
33
  ## 🔨 Bruk
@@ -83,7 +83,7 @@ Klon repoet og installer style-dictionary i `/tokens/dds`:
83
83
 
84
84
  ```
85
85
  cd tokens/dds
86
- npm install -D style-dictionary
86
+ pnpm add -D style-dictionary
87
87
  ```
88
88
 
89
89
  ### Generere design tokens i kode
@@ -91,11 +91,11 @@ npm install -D style-dictionary
91
91
  Biblioteket bruker [Style-dictionary](https://amzn.github.io/style-dictionary) for å generere design tokens som JS-konstanter, CSS-variabler og SCSS-variabler fra en eller flere JSON-filer. JSON-filen(e) ligger i `/dds/properties`. For å generere variabler fra JSON kjør følgende kommando fra `/dds`:
92
92
 
93
93
  ```
94
- npm run build-tokens
94
+ pnpm build-tokens
95
95
  ```
96
96
 
97
97
  Genererte variabler ligger i `/dds/build` organisert etter plattform.
98
98
 
99
99
  ### Build
100
100
 
101
- Det brukes custom build for generering av variabler, den ligger i `/dds/build.js`. I tillegg spesifiserer `/dds/config.json` hva output skal være og mappestruktur for den etter `npm run build-tokens` kjøres.
101
+ Det brukes custom build for generering av variabler, den ligger i `/dds/build.js`. I tillegg spesifiserer `/dds/config.json` hva output skal være og mappestruktur for den etter `pnpm build-tokens` kjøres.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norges-domstoler/dds-design-tokens",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Design tokens used in Domstolenes designsystem",
5
5
  "author": "DDS team",
6
6
  "license": "MIT",
@@ -27,19 +27,10 @@
27
27
  "norges domstoler",
28
28
  "elsa"
29
29
  ],
30
- "scripts": {
31
- "clean": "rm -r dist dds/build || :",
32
- "dev": "rollup -c -w",
33
- "build": "rollup -c",
34
- "build:clean": "npm run clean && npm run build",
35
- "build:tokens": "node ./dds/build.js",
36
- "prepack": "clean-package",
37
- "postpack": "clean-package restore"
38
- },
39
30
  "devDependencies": {
40
31
  "@rollup/plugin-commonjs": "^24.0.0",
41
32
  "@rollup/plugin-node-resolve": "^15.2.3",
42
- "@types/node": "^20.8.10",
33
+ "@types/node": "^20.9.2",
43
34
  "clean-package": "2.2.0",
44
35
  "fork-ts-checker-webpack-plugin": "^9.0.2",
45
36
  "rollup": "^3.29.4",
@@ -55,5 +46,12 @@
55
46
  },
56
47
  "clean-package": "./clean-package.config.json",
57
48
  "module": "dist/index.js",
58
- "types": "dist/src/index.d.ts"
59
- }
49
+ "types": "dist/src/index.d.ts",
50
+ "scripts": {
51
+ "clean": "rm -r dist dds/build || :",
52
+ "dev": "rollup -c -w",
53
+ "build": "rollup -c",
54
+ "build:clean": "pnpm clean && pnpm build",
55
+ "build:tokens": "node ./dds/build.js"
56
+ }
57
+ }