Skip to content

Commit

Permalink
feat: revamp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema committed Mar 29, 2024
1 parent de2c394 commit 3206154
Show file tree
Hide file tree
Showing 97 changed files with 20,717 additions and 13,378 deletions.
2 changes: 1 addition & 1 deletion .changeset/big-worms-collect-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'style-dictionary': minor
---

FileSystem that is used by Style-Dictionary can now be customized:
FileSystem that is used by Style Dictionary can now be customized:

```js
import { setFs } from 'style-dictionary/fs';
Expand Down
4 changes: 2 additions & 2 deletions .changeset/big-worms-collect.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
---

- The project has been fully converted to [ESM format](https://nodejs.org/api/esm.html), which is also the format that the browser uses.
For users, this means you'll have to either use Style-Dictionary in ESM JavaScript code, or dynamically import it into your CommonJS code.
- `Style-Dictionary.extend()` method is now asynchronous, which means it returns `Promise<StyleDictionary.Core>` instead of `StyleDictionary.Core`.
For users, this means you'll have to either use Style Dictionary in ESM JavaScript code, or dynamically import it into your CommonJS code.
- `StyleDictionary.extend()` method is now asynchronous, which means it returns `Promise<StyleDictionary.Core>` instead of `StyleDictionary.Core`.
- `allProperties` / `properties` was deprecated in v3, and is now removed from `StyleDictionary.Core`, use `allTokens` and `tokens` instead.
- Templates and the method `registerTemplate` were deprecated in v3, now removed. Use Formats instead.
- The package now uses [package entrypoints](https://nodejs.org/api/packages.html), which means that what is importable from the package is locked down to just the specified entrypoints: `style-dictionary` & `style-dictionary/fs`. If more is needed, please raise an issue explaining which file you were importing and why you need it to be public API.
4 changes: 2 additions & 2 deletions .changeset/small-apes-train.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
'style-dictionary': minor
---

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.
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';
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"env": {
"node": true,
"mocha": true,
"es6": true
"es6": true,
"browser": true
},
"extends": ["eslint:recommended"],
"plugins": ["mocha"],
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,8 @@ xcuserdata/

# Temporary build output directory for unit tests
__tests__/__output

# build output
dist/
# generated types
.astro/
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

### 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.
- 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';
Expand Down Expand Up @@ -438,15 +438,15 @@
- dcbe2fb:
- The project has been fully converted to [ESM format](https://nodejs.org/api/esm.html), which is also the format that the browser uses.
For users, this means you'll have to either use Style-Dictionary in ESM JavaScript code, or dynamically import it into your CommonJS code.
- `Style-Dictionary.extend()` method is now asynchronous, which means it returns `Promise<StyleDictionary.Core>` instead of `StyleDictionary.Core`.
For users, this means you'll have to either use Style Dictionary in ESM JavaScript code, or dynamically import it into your CommonJS code.
- `StyleDictionary.extend()` method is now asynchronous, which means it returns `Promise<StyleDictionary.Core>` instead of `StyleDictionary.Core`.
- `allProperties` / `properties` was deprecated in v3, and is now removed from `StyleDictionary.Core`, use `allTokens` and `tokens` instead.
- Templates and the method `registerTemplate` were deprecated in v3, now removed. Use Formats instead.
- The package now uses [package entrypoints](https://nodejs.org/api/packages.html), which means that what is importable from the package is locked down to just the specified entrypoints: `style-dictionary` & `style-dictionary/fs`. If more is needed, please raise an issue explaining which file you were importing and why you need it to be public API.

### Minor Changes

- dcbe2fb: FileSystem that is used by Style-Dictionary can now be customized:
- dcbe2fb: FileSystem that is used by Style Dictionary can now be customized:

```js
import { setFs } from 'style-dictionary/fs';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/formats/lessIcons.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const tokens = {
};

const platform = {
prefix: 'sd', // Style-Dictionary Prefix
prefix: 'sd', // Style Dictionary Prefix
// FIXME: check why createFormatArgs requires this prefix to be wrapped inside
// an options object for it to be properly set as option?
options: {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/formats/scssIcons.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const tokens = {
};

const platform = {
prefix: 'sd', // Style-Dictionary Prefix
prefix: 'sd', // Style Dictionary Prefix
// FIXME: check why createFormatArgs requires this prefix to be wrapped inside
// an options object for it to be properly set as option?
options: {
Expand Down
Empty file removed docs/.nojekyll
Empty file.
62 changes: 0 additions & 62 deletions docs/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions docs/_coverpage.md

This file was deleted.

26 changes: 0 additions & 26 deletions docs/_sidebar.md

This file was deleted.

Loading

0 comments on commit 3206154

Please sign in to comment.