Created
November 3, 2014 16:03
-
-
Save dancashman/a97168d7f674c8faec61 to your computer and use it in GitHub Desktop.
formatting with gulp-jsbeautifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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