Skip to content

Instantly share code, notes, and snippets.

@dancashman
Created November 3, 2014 16:03
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 dancashman/a97168d7f674c8faec61 to your computer and use it in GitHub Desktop.
Save dancashman/a97168d7f674c8faec61 to your computer and use it in GitHub Desktop.
formatting with gulp-jsbeautifier
'use strict';
var gulp = require('gulp');
var prettify = require('gulp-jsbeautifier');
gulp.task('format-app-js', function() {
gulp.src('./app/**/*.js')
.pipe(prettify({
config: '.jsbeautifyrc',
mode: 'VERIFY_AND_WRITE'
}))
.pipe(gulp.dest('./app'));
});
gulp.task('format-test-js', function() {
gulp.src('./e2e/**/*.js')
.pipe(prettify({
config: '.jsbeautifyrc',
mode: 'VERIFY_AND_WRITE'
}))
.pipe(gulp.dest('./e2e'));
});
gulp.task('format-js', ['format-app-js', 'format-test-js']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment