tokens-bruecke 2.11.1 → 2.11.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.
@@ -1,42 +1,29 @@
1
1
  on:
2
2
  push:
3
- branches:
4
- - main
5
- name: release-please
6
- permissions: {}
3
+ tags:
4
+ - 'v*'
5
+ name: release
6
+ permissions:
7
+ contents: write
8
+ packages: write
7
9
  jobs:
8
- release-please:
9
- permissions:
10
- contents: write # to create release commit (google-github-actions/release-please-action)
11
- pull-requests: write # to create release PR (google-github-actions/release-please-action)
12
- statuses: write
13
- issues: write
14
- packages: write # to create NPM package under github registry
15
-
10
+ release:
16
11
  runs-on: ubuntu-latest
12
+ env:
13
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
17
14
  steps:
18
- - uses: googleapis/release-please-action@v4
19
- id: release
20
- with:
21
- token: ${{ secrets.GITHUB_TOKEN }}
22
-
23
- - name: Checkout
24
- uses: actions/checkout@v4
25
- if: ${{ steps.release.outputs.release_created }}
15
+ - uses: actions/checkout@v4
26
16
 
27
17
  - name: Install pnpm
28
18
  uses: pnpm/action-setup@v4
29
- if: ${{ steps.release.outputs.release_created }}
30
19
 
31
20
  - name: Get pnpm store directory
32
- if: ${{ steps.release.outputs.release_created }}
33
21
  shell: bash
34
22
  run: |
35
23
  echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
36
24
 
37
25
  - name: Setup pnpm cache
38
26
  uses: actions/cache@v4
39
- if: ${{ steps.release.outputs.release_created }}
40
27
  with:
41
28
  path: ${{ env.STORE_PATH }}
42
29
  key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -45,33 +32,22 @@ jobs:
45
32
 
46
33
  - name: Install Node.js
47
34
  uses: actions/setup-node@v4
48
- if: ${{ steps.release.outputs.release_created }}
49
35
  with:
50
36
  node-version: 'lts/*'
51
- registry-url: 'https://npm.pkg.github.com'
37
+ registry-url: 'https://registry.npmjs.org'
52
38
 
53
- - name: Build package
54
- run: pnpm install && pnpm run build
55
- if: ${{ steps.release.outputs.release_created }}
39
+ - name: Install dependencies
40
+ run: pnpm install
56
41
 
57
- - name: Check if zip exists
58
- if: ${{ steps.release.outputs.release_created }}
59
- run: ls -la ./dist/
42
+ - name: Build package
43
+ run: pnpm run build
60
44
 
61
- - name: Upload Release Artifact
62
- if: ${{ steps.release.outputs.release_created }}
63
- run: gh release upload ${{ steps.release.outputs.tag_name }} ./dist/figma-plugin.zip --clobber
45
+ - name: Create GitHub release
46
+ run: gh release create ${{ github.ref_name }} ./dist/figma-plugin.zip --title "${{ github.ref_name }}" --generate-notes
64
47
  env:
65
48
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66
49
 
67
- - name: Publish on Github registry
68
- run: pnpm publish
50
+ - name: Publish to npm
51
+ run: pnpm publish --no-git-checks --access public
69
52
  env:
70
- NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
71
- if: ${{ steps.release.outputs.release_created && github.repository == 'tokens-bruecke/figma-plugin'}}
72
-
73
- # - name: Publish on npm
74
- # run: pnpm publish
75
- # env:
76
- # NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
77
- # if: ${{ steps.release.outputs.release_created && github.repository == 'tokens-bruecke/figma-plugin'}}
53
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,45 @@
2
2
 
3
3
  ## [2.11.1](https://github.com/tokens-bruecke/figma-plugin/compare/v2.11.0...v2.11.1) (2026-03-28)
4
4
 
5
+
6
+ ### Miscellaneous
7
+
8
+ * bump version to 2.11.2 ([9983f6a](https://github.com/tokens-bruecke/figma-plugin/commit/9983f6a2939207c85f3f289aa44d38ae64a1f4d1))
9
+
10
+ ## [2.11.0](https://github.com/tokens-bruecke/figma-plugin/compare/v2.10.0...v2.11.0) (2026-03-28)
11
+
12
+
13
+ ### Features
14
+
15
+ * split collections into separate files on export ([2e7fcff](https://github.com/tokens-bruecke/figma-plugin/commit/2e7fcffa1f65b37a42c1410f5e79a0403d340b5a)), closes [#17](https://github.com/tokens-bruecke/figma-plugin/issues/17)
16
+
17
+
18
+ ### Miscellaneous
19
+
20
+ * remove trailing whitespace in release.yml ([a3340cc](https://github.com/tokens-bruecke/figma-plugin/commit/a3340cc815a522dcc84f40ba40dd90395c45c647))
21
+ * update README and bump version to 2.11.0 ([9b3a332](https://github.com/tokens-bruecke/figma-plugin/commit/9b3a3325dab53c1852ff2914f98ef587bdee791d))
22
+
23
+ ## [2.10.0](https://github.com/tokens-bruecke/figma-plugin/compare/v2.9.4...v2.10.0) (2026-03-28)
24
+
25
+
26
+ ### Features
27
+
28
+ * Add export/import docs and styles warning ([6446d2a](https://github.com/tokens-bruecke/figma-plugin/commit/6446d2ab117f6e5b9270588b886e6903505f36fe))
29
+ * **cli:** add --oauth-token flag to support OAuth authentication ([ccbc16e](https://github.com/tokens-bruecke/figma-plugin/commit/ccbc16e931c653d4a1aa345902aada38c71a0af3))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * import variables ([1d72235](https://github.com/tokens-bruecke/figma-plugin/commit/1d722358b5e714710df3546727fdaba41427c863))
35
+ * **normilizeType:** return 'string' instead of 'dimension' for percentage opacity ([52085c6](https://github.com/tokens-bruecke/figma-plugin/commit/52085c63d50809f9a25a86c6fad9a26fbfd67427))
36
+
37
+
38
+ ### Miscellaneous
39
+
40
+ * format CHANGELOG ([0e2e4b0](https://github.com/tokens-bruecke/figma-plugin/commit/0e2e4b0e2fe655451c36bdd7e54f2fffbfeb3a46))
41
+
42
+ ## [2.11.1](https://github.com/tokens-bruecke/figma-plugin/compare/v2.11.0...v2.11.1) (2026-03-28)
43
+
5
44
  ### Bug Fixes
6
45
 
7
46
  - **normilizeType:** return `string` instead of `dimension` for percentage opacity
package/README.md CHANGED
@@ -29,6 +29,7 @@ The plugin converts Figma variables into design-tokens JSON that are compatible
29
29
  - [Use DTCG keys format](#use-dtcg-keys-format)
30
30
  - [Include `.value` string for aliases](#include-value-string-for-aliases)
31
31
  - [Include Figma metadata](#include-figma-metadata)
32
+ - [Split collections into separate files](#split-collections-into-separate-files)
32
33
  - [Use as cli tool](#use-as-cli-tool)
33
34
  - [Installation](#installation)
34
35
  - [Usage](#usage)
@@ -246,6 +247,15 @@ Is `off` by default. Allows you to include Figma metadata like `styleId`, `varia
246
247
  }
247
248
  ```
248
249
 
250
+ ### Split collections into separate files
251
+
252
+ Is `off` by default. When enabled, each Figma variable collection is exported as its own file instead of a single merged JSON.
253
+
254
+ - **Download JSON** — produces a `design.tokens.zip` archive containing one `{CollectionName}.tokens.json` per collection.
255
+ - **CLI** — writes individual `{CollectionName}.tokens.json` files into the directory specified by `--output`.
256
+
257
+ This is useful when you want to keep component-level token files separate (e.g. `button.tokens.json`, `card.tokens.json`).
258
+
249
259
  ---
250
260
 
251
261
  ## Use as cli tool
@@ -286,13 +296,14 @@ This will fetch figma variables and export them in `out/tokens.json`
286
296
 
287
297
  ### Options
288
298
 
289
- | Option | Alias | Description | Required |
290
- | --------------- | ----- | --------------------------------- | ------------------------------------------------- |
291
- | `--api-key` | `-a` | Figma personal access token (PAT) | One of `--api-key` or `--oauth-token` is required |
292
- | `--oauth-token` | `-t` | Figma OAuth token | One of `--api-key` or `--oauth-token` is required |
293
- | `--file-key` | `-f` | Figma file key | Yes |
294
- | `--output` | `-o` | Path to output file | Yes |
295
- | `--config` | `-c` | Path to configuration file | No |
299
+ | Option | Alias | Description | Required |
300
+ | ----------------------- | ----- | --------------------------------------------------------------------- | ------------------------------------------------- |
301
+ | `--api-key` | `-a` | Figma personal access token (PAT) | One of `--api-key` or `--oauth-token` is required |
302
+ | `--oauth-token` | `-t` | Figma OAuth token | One of `--api-key` or `--oauth-token` is required |
303
+ | `--file-key` | `-f` | Figma file key | Yes |
304
+ | `--output` | `-o` | Path to output file, or output directory when `--split-by-collection` | Yes |
305
+ | `--config` | `-c` | Path to configuration file | No |
306
+ | `--split-by-collection` | `-s` | Write each collection as a separate `.tokens.json` file in `--output` | No |
296
307
 
297
308
  > [!TIP]
298
309
  > For automated pipelines, `--oauth-token` is preferred over `--api-key`. Personal Access Tokens expire every 90 days and require manual renewal, while OAuth tokens support programmatic refresh for indefinite access.
@@ -317,7 +328,8 @@ You can use a JSON configuration file to specify the export options for the CLI.
317
328
  "includeFigmaMetaData": false, // Include Figma metadata like styleId, variableId, etc.
318
329
  "usePercentageOpacity": false, // Export opacity as percentage (10%) instead of decimal (0.1)
319
330
  "colorMode": "hex", // "hex" | "rgba-object" | "rgba-css" | "hsla-object" | "hsla-css";
320
- "storeStyleInCollection": "none" // Name of one of your collection or "none" to keep them separated
331
+ "storeStyleInCollection": "none", // Name of one of your collection or "none" to keep them separated
332
+ "splitByCollection": false // Write each collection as a separate .tokens.json file
321
333
  }
322
334
  ```
323
335