Skip to content

Instantly share code, notes, and snippets.

@princejwesley
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save princejwesley/679f092fd1f2ac2ad21c to your computer and use it in GitHub Desktop.
Save princejwesley/679f092fd1f2ac2ad21c to your computer and use it in GitHub Desktop.
Gulp configuration sample for ng-attr-hint plugin
var gulp = require('gulp');
var ngAttrHint = require('ng-attr-hint');
var gutil = require('gulp-util');
gulp.task('ng-attr-hint', function() {
ngAttrHint({ files: ['./*.html'] })
.then(function(res) {
res.forEach(function(row) {
//Use ngAttrHint.format(row) for default formatting
gutil.log("[", gutil.colors.bold.green(row.file), ":", gutil.colors.magenta(row.line),
"] [", gutil.colors.bgBlack.bold.red(row.type), "] (", gutil.colors.magenta(row.attrs),
") ", gutil.colors.blue(row.message));
});
}, function(err) {
gutil.log(gutil.colors.bgRed.bold.white(err.message));
});
});
gulp.task('default', ['ng-attr-hint'], function(){
// default task
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment