gulp-es6-sass
v0.0.8
Published
An easy-to-use module to complie your *.es6 and *.sass files. Support watch changes and instantly compile them.
Downloads
5
Readme
gulp-es6-sass
An easy-to-use module to compile your *.es6 and *.sass files. Support watch changes and instantly compile them.
Install
npm install gulp-es6-sass
Usage
var gulp = require('gulp'),
options = {
src: './src'
};
require('gulp-es6-sass')(gulp, options);
There are few tasks added in your gulp:
compile-es6
: Compile all of the *.es6 files under theoptions.src
and output to the same directory.compile-sass
:Compile all of the *.scss files under theoptions.src
and output to the same directory.compile
: It's runcompile-es6
andcompile-sass
parallel.watch-es6-sass
:Watch files changes and compile them instantly.
Now use them like this!
gulp compile
gulp watch-es6-sass
You may need gulp-compress else :)
Options
All options and its default value are list on here. It's really self-explanation.
API
var gulp = require('gulp'),
Compile = require('gulp-es6-sass'),
cpe = Compile(gulp);
Compile.sass
Equal to require('gulp-sass')
. See more info at gulp-sass.
Compile.babel
Equal to require('gulp-babel')
. See more info at gulp-babel.
Compile.watch
Equal to require('gulp-watch')
. See more info at gulp-watch.
cpe.compileEs6([globs,dest])
Compile *.es6 files from globs
to dest
.
globs
{String|String[]} - Default value isoptions.es6Files
dest
{String} - Default value isoptions.src
cpe.compileSass([globs,dest])
Compile *.scss files from globs
to dest
.
globs
{String|String[]} - Default value isoptions.sassFiles
dest
{String} - Default value isoptions.src
cps.compile([callback])
Equal to gulp compile
.
callback
{Function}
cpe.watchChange([globs])
Watch files change and compile them instantly.
globs
{String|String[]} - Default value isoptions.es6AndSassFiles
License
MIT