0.1.2 • Published 10 years ago
gulp-component-builder v0.1.2
gulp-component-builder
Disclaimer: This plugin is under active development.
Installation
$ npm install --save-dev gulp-component-builder
Usage
var gulp = require('gulp');
var component = require('gulp-component-builder');
var stylus = require('component-stylus-plugin');
gulp.task('scripts', function() {
return gulp.src('component.json')
.pipe(component.scripts())
.pipe(gulp.dest('build'));
});
gulp.task('styles', function() {
return gulp.src('component.json')
.pipe(component.styles(function(builder) {
builder.use(stylus)
}))
.pipe(gulp.dest('build'));
});
gulp.task('watch', function() {
gulp.watch(['component.json', 'lib/**/*.js'], ['scripts'])
gulp.watch(['component.json', 'lib/**/*.styl'], ['styles'])
});
gulp.task('default', ['scripts', 'styles']);
API
component([options])
component.scripts([options], [configure])
component.styles([options], [configure])
component.files([options], [configure])
License
MIT