gulp-closure-dicontainer
v0.1.5
Published
DI Container for Google Closure with automatic registration and resolving based on types
Downloads
24
Maintainers
Readme
gulp-closure-dicontainer
DI Container for Google Closure with automatic registration and resolving based on types
Plugin for closure-dicontainer.
Install
npm install --save-dev gulp-closure-dicontainer
Example
var gulp = require('gulp');
var diContainer = require('gulp-closure-dicontainer');
gulp.task('diContainer', function() {
gulp.src('build/deps.js')
.pipe(diContainer({
baseJsDir: 'bower_components/closure-library/closure/goog',
name: 'app.DiContainer',
resolve: ['App']
}))
.pipe(gulp.dest('build'))
.pipe(closureDeps({
prefix: '../../../../',
fileName: 'depsdicontainer.js'
}))
.pipe(gulp.dest('build'));
});
API
diContainer(options)
options
name
Type: String
Default value: 'app.DiContainer'
Generated DI container name.
resolve
Type: Array.<string>
Default value: ['App']
Array of types to be resolved.
baseJsDir
Type: String
Default value: 'bower_components/closure-library/closure/goog'
Optional
License
MIT © Daniel Steigerwald