Showing posts with label gulp. Show all posts
Showing posts with label gulp. Show all posts
gulp-ng-annotate

gulp-ng-annotate

July 27, 2017
Add angularjs dependency injection annotations with ng-annotate

Install

 $ npm install --save-dev gulp-ng-annotate  

Usage

 var gulp = require('gulp');  
 var ngAnnotate = require('gulp-ng-annotate');  
 gulp.task('default', function () {  
      return gulp.src('src/app.js')  
           .pipe(ngAnnotate())  
           .pipe(gulp.dest('dist'));  
 });  

Options

You can pass any of the ng-annotate options as an object:
 {  
      remove: true,  
      add: true,  
      single_quotes: true  
 }  
add: true option is implied by default unless remove is set to true.

FAQ

I got an error Error in plugin 'gulp-ng-annotate': error: couldn't process source due to parse error That's not a gulp-ng-annotate or ng-annotate error: you passed the invalid JavaScript code to the plugin. Check your source code near the specified place. That's not a gulp-ng-annotate or ng-annotate error: you passed the invalid JavaScript code to the plugin. Check your source code near the specified place. I need the latest version of ng-annotate Make sure you are using the latest version of gulp-ng-annotate. Also try to reinstall/update it to get the latest suitable version of ng-annotate from npm. I need a new annotating feature/annotations are incorrect Report it to ng-annotate's bugtracker. gulp-ng-annotate is just a wrapper around ng-annotate.

Note: Special thanks to Kagami Hiiragi

Contact: kagami@genshiken.org

Disclaimer: The blog is created to share angular directives information to geek, curious Angular Developers.