0
I need to compile templates using Grunt and I want to put the color settings inside a JSON file that will be inside each layout folder, that is, I need to use Grunt to read JSON and pass the values as variables to compile SASS.
0
I need to compile templates using Grunt and I want to put the color settings inside a JSON file that will be inside each layout folder, that is, I need to use Grunt to read JSON and pass the values as variables to compile SASS.
0
There is this plugin for Grunt https://www.npmjs.com/package/grunt-json-to-sass
Installation
npm install grunt-json-to-sass --save-dev
Setup
grunt.initConfig({
json_to_sass: {
your_target: {
files: [
{
src: [
'example.json'
],
dest: '_example.scss'
}
]
},
},
});
I hope it helps!
Browser other questions tagged json compilation grunt sass task
You are not signed in. Login or sign up in order to post.
Why not use these variables directly in SASS files?
– celsomtrindade