gulp-jss

0.0.7 • Public • Published

gulp-jss

Build Status Dependency Status devDependency Status

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/"));
});

Readme

Keywords

Package Sidebar

Install

npm i gulp-jss

Weekly Downloads

2

Version

0.0.7

License

MIT

Last publish

Collaborators

  • aaike