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

yaml-tokens example doesn't produce expected results #510

Closed
jbarreiros opened this issue Dec 17, 2020 · 2 comments
Closed

yaml-tokens example doesn't produce expected results #510

jbarreiros opened this issue Dec 17, 2020 · 2 comments

Comments

@jbarreiros
Copy link
Contributor

jbarreiros commented Dec 17, 2020

Pulled down 3.0.0-rc.1 to test it out and it has some great stuff. The transitive feature is 🌶️

Testing out the "yaml-tokens" example, and when I run npm run build, it completes, but the final result (build/variables.css) looks like:

/**
 * Do not edit directly
 * Generated on Thu, 17 Dec 2020 17:52:16 GMT
 */

:root {

}

Interestingly, if I put the following at the top of sd.config.js, it shows that the yaml package is interpreting the yaml file correctly.

const yaml = require('yaml');
const fs = require('fs');

const yamlraw = fs.readFileSync('./tokens/color/core.yaml', {encoding: 'UTF-8'});
const result = yaml.parse(yamlraw);
console.log(result);
{ color:
   { base:
      { white: [Object],
        red: [Object],
        green: [Object],
        success: [Object] } } }
@dbanksdesign
Copy link
Member

There was an issue that no parsers were being run because we changed the method signature of combineJSON.. but I posted a PR for that fix. Thanks for bringing this up!

@chazzmoney
Copy link
Collaborator

chazzmoney commented Dec 19, 2020

This is fixed now in the 3.0 branch and will be part of 3.0.0-rc.2

Thank you @jbarreiros and @dbanksdesign for finding and fixing respectively.

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

No branches or pull requests

3 participants