Skip to content

Commit

Permalink
Reveal all of the MakeAPIs faults
Browse files Browse the repository at this point in the history
  • Loading branch information
cadecairos committed Mar 4, 2015
1 parent 8895ae7 commit a3f7ee8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 16 deletions.
50 changes: 38 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
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",
"server.js",
"lib/**/*.js",
"public/js/*.js",
"routes/**/*.js",
"test/**/*.js"
];
var jsbeautifyrcReadOnly = jsbeautifyrc;
jsbeautifyrcReadOnly.mode = "VERIFY_ONLY";

grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),

Expand All @@ -9,23 +25,33 @@ module.exports = function( grunt ) {
]
},
jshint: {
options: {
es5: true,
newcap: false
options: jshintrc,
files: javaScriptFiles
},
jsbeautifier: {
modify: {
src: javaScriptFiles,
options: jsbeautifyrc
},
files: [
"Gruntfile.js",
"server.js",
"lib/**/*.js",
"public/js/*.js",
"routes/**/*.js",
"test/**/*.js"
]
verify: {
src: javaScriptFiles,
options: jsbeautifyrcReadOnly
}
},
jscs: {
src: javaScriptFiles,
options:jscsrc
}
});

grunt.loadNpmTasks( "grunt-contrib-csslint" );
grunt.loadNpmTasks( "grunt-contrib-jshint" );
grunt.loadNpmTasks( "grunt-jsbeautifier" );
grunt.loadNpmTasks( "grunt-jscs" );

grunt.registerTask( "clean", [ "jsbeautifier:modify" ] );

grunt.registerTask( "validate", [ "jsbeautifier:verify", "jshint", "jscs", "csslint" ] );

grunt.registerTask( "default", [ "csslint", "jshint" ]);
grunt.registerTask( "default", [ "validate" ] );
};
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@
},
"devDependencies": {
"bower": "1.3.8",
"grunt": "0.4.1",
"grunt-contrib-csslint": "0.1.2",
"grunt-contrib-jshint": "0.4.3",
"mocha": "1.9.0"
"grunt": "0.4.5",
"grunt-contrib-csslint": "0.4.0",
"grunt-contrib-jshint": "0.11.0",
"grunt-jsbeautifier": "0.2.8",
"grunt-jscs": "1.5.0",
"js-beautify": "1.5.4",
"jscs": "1.11.3",
"jshint": "2.6.3",
"mocha": "1.9.0",
"mofo-style": "1.0.1"
},
"engines": {
"node": ">=0.8.23",
Expand Down

0 comments on commit a3f7ee8

Please sign in to comment.