diff --git a/bigbluebutton-html5/.jscsrc b/bigbluebutton-html5/.jscsrc old mode 100644 new mode 100755 index 2b52cc8bcfc4..fb242fb301df --- a/bigbluebutton-html5/.jscsrc +++ b/bigbluebutton-html5/.jscsrc @@ -1,6 +1,6 @@ { "preset": "airbnb", "maxErrors": null, // display all errors - "fileExtensions": [".js", ".jsx"] + "fileExtensions": [".js", ".jsx"], + "esnext": true } - diff --git a/bigbluebutton-html5/Gruntfile.js b/bigbluebutton-html5/Gruntfile.js old mode 100644 new mode 100755 index ebe5fdf986fb..1cd515fa19d6 --- a/bigbluebutton-html5/Gruntfile.js +++ b/bigbluebutton-html5/Gruntfile.js @@ -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 @@ -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']); }; diff --git a/bigbluebutton-html5/package.json b/bigbluebutton-html5/package.json index 718ecff83d92..bb91f15ddf2d 100755 --- a/bigbluebutton-html5/package.json +++ b/bigbluebutton-html5/package.json @@ -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" } }