gulp-angular-tpl2js

1.0.0 • Public • Published

gulp-angular-tpl2js

Build Status NPM Version Dependency Status devDependency Status Coverage Climate

Inject AngularJS directive templates as inline JavaScript using gulp

Regarding Issues

This is just a simple gulp plugin, which means it's nothing more than a thin wrapper around angular-tpl2js. If it looks like you are having issues, please open an issue at angular-tpl2js. Only create a new issue if it looks like you're having a problem with the plugin itself.

Install

npm install gulp-angular-tpl2js --save-dev

API

tpl2js([config])

var gulp = require('gulp');
var tpl2js = require('gulp-angular-tpl2js');
 
gulp.task('inline', function() {
    return gulp.src('/js/directives/*.js')
        .pipe(tpl2js())
        .pipe(gulp.dest('/dest'));
});

config

include for retrieving ng-include templates and HTMLMinifier, a relay for html-minifier options

// defaults
var config = {
    include: false,
    HTMLMinifier: {
        collapseWhitespace: true,
        removeComments: true
    }
}

var gulp = require('gulp');
var tpl2js = require('gulp-angular-tpl2js');
 
gulp.task('inline', function() {
    return gulp.src('/js/directives/*.js')
        .pipe(tpl2js({include: true})) // ng-include parsed
        .pipe(gulp.dest('/dest'));
});

Readme

Keywords

none

Package Sidebar

Install

npm i gulp-angular-tpl2js

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • scniro