-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Gulp, JShint and JSBeautifier
- Loading branch information
1 parent
bc32587
commit 9ca282e
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"indent_size": 4, | ||
"indent_char": " ", | ||
"eol": "\n", | ||
"indent_level": 0, | ||
"indent_with_tabs": false, | ||
"preserve_newlines": true, | ||
"max_preserve_newlines": 10, | ||
"jslint_happy": false, | ||
"space_after_anon_function": false, | ||
"brace_style": "collapse", | ||
"keep_array_indentation": false, | ||
"keep_function_indentation": false, | ||
"space_before_conditional": true, | ||
"break_chained_methods": false, | ||
"eval_code": false, | ||
"unescape_strings": false, | ||
"wrap_line_length": 0, | ||
"wrap_attributes": "auto", | ||
"wrap_attributes_indent_size": 4, | ||
"end_with_newline": false | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var gulp = require('gulp'); | ||
var jshint = require('gulp-jshint'); | ||
var stylish = require('jshint-stylish'); | ||
var prettify = require('gulp-jsbeautifier'); | ||
|
||
|
||
|
||
/** | ||
* Jshint | ||
*/ | ||
gulp.task('jshint', function() { | ||
return gulp.src(['./api/**/*.js', './assets/js/app/**/*.js', './test/**/*.js', '!./api/hooks']) | ||
.pipe(jshint()) | ||
.pipe(jshint.reporter(stylish)); | ||
}); | ||
|
||
|
||
/** | ||
* Beautify JS code | ||
*/ | ||
gulp.task('format-js', function() { | ||
gulp.src(['./api/**/*.js', '!./api/hooks' ]) | ||
.pipe(prettify({config: '.jsbeautifyrc', mode: 'VERIFY_AND_WRITE'})) | ||
.pipe(gulp.dest('./api')); | ||
}); |
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