gulp-requirerc
v1.0.0
Published
Gulp adapter for RequireJS
Downloads
3
Maintainers
Readme
gulp-requirerc
Gulp adapter for RequireJS
Installation
from github:
npm i -D adriancmiranda/gulp-requirerc
from npmjs:
npm i -D gulp-requirerc
Usage
// Gulp adapter for RequireJS
// @see https://github.com/adriancmiranda/gulp-requirerc
var requirerc = require('gulp-requirerc');
// All configuration options.
// @see https://github.com/requirejs/r.js/blob/master/build/example.build.js
gulp.task('scripts', function(){
return gulp.src('source/scripts/*.js').pipe(requirerc({
baseUrl:'static/scripts',
uglify2:{ warnings:true },
optimize:'uglify2',
generateSourceMaps:true,
preview:true, // extra option
outDir:'bundle', // extra option
outSuffix:'.min' // extra option
}));
});
Options
Type: Object
options.preview
Type: Boolean
Default: true
options.outDir
Type: string
Default: ''
options.suffix
Type: string
Default: '.bundle'