yml-to-scss-loader
v0.1.4
Published
compiles yml settings files into scss and json equivalents for having the same settings in both scss and js
Downloads
2
Readme
yml-to-scss-loader is a webpack loader which translates yml settings files into scss and json. The purpose is to have the config in one single place and be able to use it in scss and js, react or vue apps.
This could be useful especially for component props validation automation.
Install
Install with npm:
$ npm install --save-dev yml-to-scss-loader
Install with yarn:
$ yarn add yml-to-scss-loader
Install with bower
$ bower install yml-to-scss-loader --save
##Usage:
in your webpack config add the following rule, replacing the vars with your own settings:
module: {
rules: [{
test: /\.yml?$/,
use: {
loader: 'yml-to-scss-loader',
options: {
output: [path-to-json-and-scss-files],
scss: true,
json: true
}
},
exclude: [
/(node_modules)/
]
}]
}
##License
MIT © Catalin Nita