Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to auto-generate colors.js module of ustyle colors #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

domtronn
Copy link
Contributor

I thought it might be nice to include all of the ustyle colour variables in ustyle-react so that you would be able to do things like the following

import { cRed } from 'ustyle-react/dist/colors'

export default () => (
  <Icon fill={cRed} />
)

In order to keep these aligned with ustyle itself, I thought it would be best to generate this file rather than having to manually maintain the map (even if the colours don't change very often). So I wrote a script which will pull out all the colour variables from the _colors.scss and convert them into a ES6 module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant