a78bd6c7 by Adam Heath

Allow for the model and view dir names to be configured.

1 parent 8a0b08b1
1 { 1 {
2 "name": "grunt-monty-python", 2 "name": "grunt-monty-python",
3 "version": "2016.05.25-1", 3 "version": "2016.05.27-0",
4 "ignore": [ 4 "ignore": [
5 "**/.*", 5 "**/.*",
6 "node_modules", 6 "node_modules",
......
...@@ -138,6 +138,8 @@ module.exports = function (grunt) { ...@@ -138,6 +138,8 @@ module.exports = function (grunt) {
138 function createConfig(mpConfig) { 138 function createConfig(mpConfig) {
139 mpConfig = _.extend({ 139 mpConfig = _.extend({
140 base: 'src', 140 base: 'src',
141 modelDir: 'model',
142 viewDir: 'view',
141 }, mpConfig); 143 }, mpConfig);
142 144
143 var holyGrailTmp = '.grunt/holygrail'; 145 var holyGrailTmp = '.grunt/holygrail';
...@@ -235,7 +237,7 @@ module.exports = function (grunt) { ...@@ -235,7 +237,7 @@ module.exports = function (grunt) {
235 options: _.extend({}, mpConfig[name].modelOptions, modelOptions, mpConfig[name].browserOptions, browserOptions), 237 options: _.extend({}, mpConfig[name].modelOptions, modelOptions, mpConfig[name].browserOptions, browserOptions),
236 files: { 238 files: {
237 src: [ 239 src: [
238 mpConfig.base + '/scripts/model/**/*.js', 240 mpConfig.base + '/scripts/' + mpConfig.modelDir + '/**/*.js',
239 ], 241 ],
240 }, 242 },
241 }, 243 },
...@@ -243,7 +245,7 @@ module.exports = function (grunt) { ...@@ -243,7 +245,7 @@ module.exports = function (grunt) {
243 options: _.extend({}, mpConfig[name].viewOptions, viewOptions, mpConfig[name].browserOptions, browserOptions), 245 options: _.extend({}, mpConfig[name].viewOptions, viewOptions, mpConfig[name].browserOptions, browserOptions),
244 files: { 246 files: {
245 src: [ 247 src: [
246 mpConfig.base + '/scripts/view/**/*.js', 248 mpConfig.base + '/scripts/' + mpConfig.viewDir + '/**/*.js',
247 ], 249 ],
248 }, 250 },
249 }, 251 },
...@@ -359,7 +361,7 @@ module.exports = function (grunt) { ...@@ -359,7 +361,7 @@ module.exports = function (grunt) {
359 }, 361 },
360 src: [ 362 src: [
361 htmlSourceDir + '/!(scripts){,**/}*.html', 363 htmlSourceDir + '/!(scripts){,**/}*.html',
362 htmlSourceDir + '/scripts/view/**/*.html', 364 htmlSourceDir + '/scripts/' + mpConfig.viewDir + '/**/*.html',
363 ], 365 ],
364 }, 366 },
365 }; 367 };
...@@ -373,8 +375,9 @@ module.exports = function (grunt) { ...@@ -373,8 +375,9 @@ module.exports = function (grunt) {
373 assetsDirs: ['dist/build'], 375 assetsDirs: ['dist/build'],
374 }, 376 },
375 src: [ 377 src: [
376 'dist/build/!(scripts){,**/}*.html', 378 'dist/build/**/*.html',
377 'dist/build/scripts/view/**/*.html', 379 '!dist/build/scripts/**/*.html',
380 'dist/build/scripts/' + mpConfig.viewDir + '/**/*.html',
378 ], 381 ],
379 }, 382 },
380 }; 383 };
......
1 { 1 {
2 "name": "grunt-monty-python", 2 "name": "grunt-monty-python",
3 "version": "2016.05.25-1", 3 "version": "2016.05.27-0",
4 "description": "Build system for grunt", 4 "description": "Build system for grunt",
5 "license": "BSD", 5 "license": "BSD",
6 "repository": { 6 "repository": {
......