more work on two grunt build modes, backend/standalone modes

This commit is contained in:
Torkel Ödegaard
2014-12-31 16:19:45 +01:00
parent f8ddfec98c
commit 9c3cd87bee
4 changed files with 88 additions and 73 deletions
+13 -1
View File
@@ -11,6 +11,19 @@ module.exports = function (grunt) {
docsDir: 'docs/'
};
config.mode = grunt.option('mode') || 'standalone';
config.modeOptions = {
requirejs: {
paths: { config: '../config.sample' },
excludeConfig: true,
}
};
if (config.mode === 'backend') {
config.modeOptions.requirejs.path = { config: 'components/config' };
config.modeOptions.requirejs.excludeConfig = true;
}
// load plugins
require('load-grunt-tasks')(grunt);
@@ -34,5 +47,4 @@ module.exports = function (grunt) {
// pass the config to grunt
grunt.initConfig(config);
};