https://github.com/hamlim/ds
A simple build script and format for building a design system from config files.
https://github.com/hamlim/ds
design-systems
Last synced: 10 months ago
JSON representation
A simple build script and format for building a design system from config files.
- Host: GitHub
- URL: https://github.com/hamlim/ds
- Owner: hamlim
- Created: 2018-01-03T00:51:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-07-31T16:23:28.000Z (11 months ago)
- Last Synced: 2025-09-01T21:54:27.393Z (10 months ago)
- Topics: design-systems
- Language: JavaScript
- Homepage:
- Size: 1.55 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# DS
DS is a simple node script to build out a json config file for css-in-js design systems. It consumes three paths to:
* `colors.js`
* `fonts.js`
* `numbers.js`
and then generates a json string representation of the design system.
## Use:
```bash
# CLI
yarn ds-cli --config='./appconfig.json'
```
```Javascript
// Use in a build script
import ds from '@matthamlin/ds';
const stringifiedJSON = ds({
fonts: require('path/to/fonts.js'),
colors: require('path/to/colors.js'),
numbers: require('path/to/numbers.js')
});
// fs.writeFile('./out.json', stringifiedJSON);
// JSON.parse(stringifiedJSON);
```
### What does it look like?
To see an example of this in action, clone the repo, cd to `packages/ds`, run `yarn` then `yarn make-example` and see `./example/out.json` file generated.
### Prior Art:
* [design-system-utils](https://github.com/mrmartineau/design-system-utils)