gulp-closure-deps
v0.4.0
Published
A gulp.js port of Google Closure library depswriter.py
Downloads
3,970
Maintainers
Readme
gulp-closure-deps
Google Closure Library depswriter.py port for gulp
Install
npm install --save-dev gulp-closure-deps
Example
var gulp = require('gulp');
var closureDeps = require('gulp-closure-deps');
var paths = {
scripts: [
'bower_components/closure-library/closure/goog/**/*.js',
'bower_components/este-library/este/**/*.js',
'client/**/*.js',
'server/**/*.js'
]
};
gulp.task('default', function() {
gulp.src(paths.scripts)
.pipe(closureDeps({
fileName: 'deps.js',
prefix: '../../../..',
baseDir: 'public/'
}))
.pipe(gulp.dest('build'));
});
API
closureDeps(options)
options
fileName
Type: String
Default: deps.js
Generated file name.
prefix
Type: String
Default: ``
Path prefix for paths resolving, from Closure Library base.js to root.
baseDir
Type: String
Default: ``
Optional base url for you public folder
methods
changed
Type: String
Returns: Boolean
This method can be used in watch mode. You can pass changed file path and it returns whether deps file should be recreated.
Error: EMFILE Issue
OSX has default limit for opened files set to 256. Fix it with ulimit -n 10000
License
MIT © Daniel Steigerwald