Skip to content

Commit

Permalink
chore: release (prerelease) (#1129)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Mar 25, 2024
1 parent 236c027 commit 5f2f8c5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"pretty-clocks-guess",
"rich-pianos-walk",
"rotten-shirts-fail",
"small-apes-train",
"smooth-bulldogs-type",
"stale-teachers-hug",
"sweet-toes-fly",
Expand Down
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Changelog

## 4.0.0-prerelease.20

### Minor Changes

- aff6646: Allow passing a custom FileSystem Volume to your Style-Dictionary instances, to ensure input/output files are read/written from/to that specific volume.
Useful in case you want multiple Style-Dictionary instances that are isolated from one another in terms of inputs/outputs.

```js
import { Volume } from 'memfs';
// You will need a bundler for memfs in browser...
// Or use as a prebundled fork:
import memfs from '@bundled-es-modules/memfs';
const { Volume } = memfs;

const vol = new Volume();

const sd = new StyleDictionary(
{
tokens: {
colors: {
red: {
value: '#FF0000',
type: 'color',
},
},
},
platforms: {
css: {
transformGroup: 'css',
files: [
{
destination: 'variables.css',
format: 'css/variables',
},
],
},
},
},
{ volume: vol },
);

await sd.buildAllPlatforms();

vol.readFileSync('/variables.css');
/**
* :root {
* --colors-red: #FF0000;
* }
*/
```

This also works when using extend:

```js
const extendedSd = await sd.extend(cfg, { volume: vol });
```

## 4.0.0-prerelease.19

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "style-dictionary",
"version": "4.0.0-prerelease.19",
"version": "4.0.0-prerelease.20",
"description": "Style once, use everywhere. A build system for creating cross-platform styles.",
"keywords": [
"style dictionary",
Expand Down

0 comments on commit 5f2f8c5

Please sign in to comment.