Added the ability to import yaml/json files into the toolkit/scss#221
Added the ability to import yaml/json files into the toolkit/scss#221motleydev wants to merge 1 commit intofbrctr:masterfrom
Conversation
…es, reusing variables across dom and stylesheets.
|
This is awesome. I love this idea. It helps meet a need I've heard from a lot of people. What do you think about making an additional function more specific to just toolkit values? Something like |
|
Thanks! I also like the idea of more helper functions, the only potential problem is that the importer brings the filename in as the first map variable and so the functions become file-name dependent. Not a huge issue but something to be mindful of. The only solution I can think of is to add a build script in gulp that generates helper functions using the base filename for any yaml files present in the data folder. Otherwise we just let it beak if they change the filename. :) What do you think? |
|
Hey, any more thoughts on this? I'm happy to refactor according to your original concept, just curious what the status is. Thanks! I really like this project, I want to see it grow! |
There was a problem hiding this comment.
Add a toolkit() function shortcut that pulls in the toolkit map, eliminating the first argument.
e.g.:
color: toolkit(colors, primary, Dark)
|
This would be huge. |
This PR adds the ability to import json, yaml and directories using import-once. I really like the idea of driving the toolkit from a data file and this allows for reuse of the variables.