styley
v1.0.0
Published
Freaky Styley Sheets
Downloads
1
Maintainers
Readme
styley
Freaky Styley Sheets
Turn ./index.css
...
@import './variable';
:root {
--color: white;
}
body {
background-color: var(--background-color);
color: var(--color);
}
@import './module/index';
and ./variable.css
...
:root {
--background-color: black;
}
and ./module/index.css
...
.module {
background-color: var(--background-color);
color: var(--color);
display: flex;
}
...into ./build/bundle.css
:
body {
background-color: black;
color: white;
}
.module {
background-color: black;
color: white;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
command line interface
npm install styley -g
styley examples
application program interface
npm install styley --save-dev
var
styley = require('styley');
styley({
input: 'examples'
}, function (error, css) {
console.log(css);
};
Resolving input/output file paths mimicks Node.js
input
option resolves in order:
- PATH/FILENAME.css
- PATH/index.css
- ./index.css
- error
output
option resolves in order:
- PATH/FILENAME.css
- PATH/bundle.css
- ./build/bundle.css
output
will create directories and files as needed.