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

Import JSON #97

Merged
merged 9 commits into from
Dec 7, 2021
Merged

Import JSON #97

merged 9 commits into from
Dec 7, 2021

Conversation

argyleink
Copy link
Owner

@argyleink argyleink commented Dec 4, 2021

fixes #95, cc @roblevintennis and #87

this PR/branch is a POC for building JSON files alongside the css files. there's still lots to do, but this kicks it off.

todo:

  • fix trailing commas
  • output files to project root not src
  • add files to the exports in package.json
  • update docsite with info about json option
  • match a design system json schema
  • test

@github-actions
Copy link

github-actions bot commented Dec 4, 2021

Visit the preview URL for this PR (updated for commit b3b9903):

https://open-props--pr97-json-output-afxnyzuo.web.app

(expires Tue, 14 Dec 2021 04:41:43 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@argyleink
Copy link
Owner Author

Screen Shot 2021-12-03 at 9 18 33 PM

added a place to specify which props to be turned into JSON

src/_create-props.js Outdated Show resolved Hide resolved
@argyleink argyleink marked this pull request as ready for review December 6, 2021 07:06
@argyleink
Copy link
Owner Author

open-props.tokens.json meet the design token standard, though could be improved by adding types.

will be available via npm as require('open-props/json') or via cdn as https://unpkg.com/open-props/open-props.tokens.json

@roblevintennis
Copy link

Noice! Thanks for adding design token support @argyleink 🎉

@argyleink argyleink merged commit d0fee82 into main Dec 7, 2021
@argyleink argyleink deleted the json-output branch December 7, 2021 04:55
kelvindecosta pushed a commit to kelvindecosta/open-props that referenced this pull request Nov 16, 2022
* prototype loop for building json

* fixes trailing comma

* indicate which we want as json

* match token spec, output single file, add npm export

* update test workflow to gen json

* version bump

* adds docsite info for json design tokens

* mention json as an option
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.

Add json to CDN and NPM as a way to consume the props
2 participants