gulp-jss
v0.0.7
Published
Gulp plugin for JSS
Downloads
1
Readme
gulp-jss
Gulp plugin for JSS.
This plugin will render the output of each jss file and concatenate the results.
Make sure the jss files exports the style as a named module called styles
:
example.jss
module.exports.styles = {
'body': {
width: '100px',
height: '100px'
}
};
Plain json files will also be processed.
example.json
{
"body": {
"width": "100px",
"height": "100px"
}
}
Usage
var gulp = require('gulp');
var jss = require('gulp-jss');
var autoprefixer = require('gulp-autoprefixer');
gulp.task('jss', function() {
gulp.src("jss/*.jss")
.pipe(jss({
named: false
}))
.pipe(autoprefixer({ browsers: ['last 2 versions'] }))
.pipe(gulp.dest(output));
});
Registering plugins
var gulp = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var jss = require('gulp-jss');
var nested = require('jss-nested');
gulp.task('jss', function() {
gulp.src("./lib/jss/**/*.jss")
.pipe(jss({
named: false,
use:[nested]
}))
.pipe(autoprefixer({ browsers: ['last 3 versions'] }))
.pipe(gulp.dest("dev/css/"));
});