gulp-closure-dicontainer

v0.1.2
DI Container for Google Closure with automatic registration and resolving based on types
closure compiler dicontainer google gulpplugin

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

Metadata

  • MIT
  • >=0.10.0
  • Daniel Steigerwald
  • released 8/8/2014

Downloads

Maintainers