Skip to content

Commit

Permalink
Added options of running HTML5 client in development/production modes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximKhlobystov committed Apr 25, 2016
1 parent fbd6ca1 commit f36b051
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
20 changes: 14 additions & 6 deletions bigbluebutton-html5/Gruntfile.js
Expand Up @@ -40,18 +40,24 @@ module.exports = function (grunt) {
},

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',
start_meteor_development: {
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 --settings settings-development.json',
},
start_meteor_production: {
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 --settings settings-production.json',
}
},

concurrent: {
options: {
logConcurrentOutput: true,
limit: 3,
},
meteor_watch: {
tasks: ['shell:start_meteor', 'watch']
meteor_watch_development: {
tasks: ['shell:start_meteor_development', 'watch']
},
meteor_watch_production: {
tasks: ['shell:start_meteor_production', 'watch']
},
}
});
Expand All @@ -64,9 +70,11 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-concurrent');

var mode = grunt.option('mode') || 'development';

// sets the default task to run JSCS first (forcing our way past warnings) and then start Meteor:
grunt.registerTask('default', ['force:jscs:check', 'concurrent:meteor_watch']);
grunt.registerTask('default', ['force:jscs:check', 'concurrent:meteor_watch_' + mode]);

// sets the autofix task to fix JSCS warning when possible and then start Meteor:
grunt.registerTask('autofix', ['force:jscs:autofix', 'concurrent:meteor_watch']);
grunt.registerTask('autofix', ['force:jscs:autofix', 'concurrent:meteor_watch_' + mode]);
};
5 changes: 5 additions & 0 deletions bigbluebutton-html5/settings-development.json
@@ -0,0 +1,5 @@
{
"public": {
"mode": "development"
}
}
5 changes: 5 additions & 0 deletions bigbluebutton-html5/settings-production.json
@@ -0,0 +1,5 @@
{
"public": {
"mode": "production"
}
}

0 comments on commit f36b051

Please sign in to comment.