Skip to content

Commit

Permalink
Incorporated linting into the build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximKhlobystov authored and gcampes committed Apr 6, 2016
1 parent 30b6a3c commit 69df372
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bigbluebutton-html5/.jscsrc 100644 → 100755
@@ -1,6 +1,6 @@
{
"preset": "airbnb",
"maxErrors": null, // display all errors
"fileExtensions": [".js", ".jsx"]
"fileExtensions": [".js", ".jsx"],
"esnext": true
}

29 changes: 24 additions & 5 deletions bigbluebutton-html5/Gruntfile.js 100644 → 100755
@@ -1,7 +1,12 @@
/* jshint node: true */
'use strict';

//require('load-grunt-tasks')(grunt);

module.exports = function(grunt) {

require('load-grunt-tasks')(grunt);

// configure Grunt
grunt.initConfig({
// files to lint with the JSHint task
Expand All @@ -22,15 +27,29 @@ module.exports = function(grunt) {
'!app/packages/**/*'
]
}
},

jscs: {
src: ['**/*.js', '**/*.jsx'],
options: {
config: '.jscsrc',
verbose: true,
esnext: true
}
},

shell: {
start_meteor: {
command: 'HOME=/usr/share/meteor JASMINE_SERVER_UNIT=0 JASMINE_SERVER_INTEGRATION=0 JASMINE_CLIENT_INTEGRATION=0 JASMINE_BROWSER=PhantomJS JASMINE_MIRROR_PORT=3000 ROOT_URL=http://127.0.0.1/html5client meteor'
}
}
});

// load the module containing the JSHint task
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-coffeelint');
grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-force-task');

// register a default task to run JSHint
// (allows `grunt` rather than `grunt jshint`)

grunt.registerTask('default', ['jshint', 'coffeelint']);
// sets the default task to run JSCS first (forcing our way past warnings) and then start Meteor:
grunt.registerTask('default', ['force:jscs', 'shell:start_meteor']);
};
6 changes: 5 additions & 1 deletion bigbluebutton-html5/package.json
Expand Up @@ -17,6 +17,10 @@
"grunt-coffeelint": "0.0.13",
"grunt-contrib-coffee": "^0.11.1",
"grunt-contrib-jshint": "^0.10.0",
"jscs": "~2.11.0"
"jscs": "~2.11.0",
"grunt-jscs": "~2.8.0",
"grunt-shell": "~1.2.1",
"load-grunt-tasks": "~3.4.1",
"grunt-force-task": "~2.0.0"
}
}

0 comments on commit 69df372

Please sign in to comment.