@powerlines/plugin-style-dictionary 0.3.586 → 0.3.587

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 (2) hide show
  1. package/README.md +38 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -74,6 +74,44 @@ A Powerlines plugin to generate project code with [Style Dictionary](https://amz
74
74
 
75
75
  <!-- END doctoc -->
76
76
 
77
+ ## Features
78
+
79
+ - Generates project code and design tokens with [Style Dictionary](https://amzn.github.io/style-dictionary/#/)
80
+ - Uses token sources from the Style Dictionary `source` / `include` paths with no options needed
81
+ - Accepts tokens passed directly via the `tokens` option
82
+ - Runs during the `prepare` command, or manually with `skipBuild: true`
83
+
84
+ ## Usage
85
+
86
+ Install the plugin:
87
+
88
+ ```bash
89
+ pnpm add @powerlines/plugin-style-dictionary
90
+ ```
91
+
92
+ Register it in `powerlines.config.ts`:
93
+
94
+ ```ts
95
+ import { plugin as styleDictionary } from "@powerlines/plugin-style-dictionary";
96
+ import { defineConfig } from "powerlines/config";
97
+
98
+ export default defineConfig({
99
+ plugins: [styleDictionary()]
100
+ });
101
+ ```
102
+
103
+ Run the `prepare` command to build the tokens. To pass tokens directly:
104
+
105
+ ```ts
106
+ export default defineConfig({
107
+ plugins: [
108
+ styleDictionary({
109
+ tokens: { color: { brand: { value: "#1fb2a6" } } }
110
+ })
111
+ ]
112
+ });
113
+ ```
114
+
77
115
  ## Installing
78
116
 
79
117
  Using [pnpm](http://pnpm.io):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-style-dictionary",
3
- "version": "0.3.586",
3
+ "version": "0.3.587",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to generate project code with Style Dictionary.",
6
6
  "keywords": [
@@ -97,19 +97,19 @@
97
97
  "dependencies": {
98
98
  "@power-plant/core": "^0.0.98",
99
99
  "@power-plant/style-dictionary": "^0.0.83",
100
- "@powerlines/plugin-power-plant": "^0.1.73",
101
- "@storm-software/config-tools": "^1.190.151",
100
+ "@powerlines/plugin-power-plant": "^0.1.74",
101
+ "@storm-software/config-tools": "^1.190.154",
102
102
  "@stryke/string-format": "^0.17.58",
103
103
  "@stryke/type-checks": "^0.6.49",
104
104
  "@stryke/types": "^0.12.44",
105
105
  "defu": "^6.1.7",
106
- "powerlines": "^0.47.216",
106
+ "powerlines": "^0.47.217",
107
107
  "style-dictionary": "^5.7.0"
108
108
  },
109
109
  "devDependencies": {
110
- "@powerlines/plugin-plugin": "^0.12.629",
110
+ "@powerlines/plugin-plugin": "^0.12.630",
111
111
  "@types/node": "^25.9.9"
112
112
  },
113
113
  "publishConfig": { "access": "public" },
114
- "gitHead": "75efa1cc4eb8bc90093202669065576aa70fbfef"
114
+ "gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
115
115
  }