This repository has been archived by the owner on Sep 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #323 from cadecairos/mofo-style
Add MoFo Styling
- Loading branch information
Showing
22 changed files
with
1,001 additions
and
939 deletions.
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 |
---|---|---|
@@ -1,27 +1,54 @@ | ||
module.exports = function( grunt ) { | ||
module.exports = function (grunt) { | ||
var jsbeautifyrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jsbeautifyrc"); | ||
var jscsrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jscsrc"); | ||
var jshintrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jshintrc"); | ||
|
||
var javaScriptFiles = [ | ||
"Gruntfile.js", | ||
"app.js", | ||
"test/**/*.js", | ||
"lib/**/*.js", | ||
"app/dev/**/*.js", | ||
"app/http/*.js", | ||
"app/lib/*.js", | ||
"app/http/controllers/*.js", | ||
"app/http/public/js/*.js", | ||
"app/http/views/js/*.ejs", | ||
"app/db/**/*.js" | ||
]; | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON( "package.json" ), | ||
pkg: grunt.file.readJSON("package.json"), | ||
|
||
jshint: { | ||
files: [ | ||
"Gruntfile.js", | ||
"app.js", | ||
"test/**/*.js", | ||
"lib/**/*.js", | ||
"app/dev/**/*.js", | ||
"app/http/*.js", | ||
"app/lib/*.js", | ||
"app/http/controllers/*.js", | ||
"app/http/public/js/*.js", | ||
"app/http/views/js/*.ejs", | ||
"app/db/**/*.js" | ||
] | ||
options: jshintrc, | ||
files: javaScriptFiles | ||
}, | ||
jsbeautifier: { | ||
options: { | ||
js: jsbeautifyrc | ||
}, | ||
modify: { | ||
src: javaScriptFiles | ||
}, | ||
verify: { | ||
src: javaScriptFiles, | ||
options: { | ||
mode: "VERIFY_ONLY" | ||
} | ||
} | ||
}, | ||
jscs: { | ||
src: javaScriptFiles, | ||
options: jscsrc | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks( "grunt-recess" ); | ||
grunt.loadNpmTasks( "grunt-contrib-jshint" ); | ||
grunt.loadNpmTasks("grunt-contrib-jshint"); | ||
grunt.loadNpmTasks("grunt-jsbeautifier"); | ||
grunt.loadNpmTasks("grunt-jscs"); | ||
|
||
grunt.registerTask( "default", [ "jshint" ]); | ||
grunt.registerTask( "travis", [ "jshint" ]); | ||
grunt.registerTask("clean", ["jsbeautifier:modify"]); | ||
grunt.registerTask("validate", ["jsbeautifier:verify", "jshint", "jscs"]); | ||
grunt.registerTask("default", ["validate"]); | ||
}; |
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
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
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
Oops, something went wrong.