gulp-closure-dicontainer

0.1.5 • Public • Published

gulp-closure-dicontainer

Build Status Dependency Status devDependency Status

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

Package Sidebar

Install

npm i gulp-closure-dicontainer

Weekly Downloads

0

Version

0.1.5

License

MIT

Last publish

Collaborators

  • steida