Skip to content
/ ds Public

A simple build script and format for building a design system from config files.

Notifications You must be signed in to change notification settings

hamlim/ds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

# CLI
yarn ds-cli --config='./appconfig.json'
// 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:

About

A simple build script and format for building a design system from config files.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published