a78bd6c7 by Adam Heath

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

1 parent 8a0b08b1
{
"name": "grunt-monty-python",
"version": "2016.05.25-1",
"version": "2016.05.27-0",
"ignore": [
"**/.*",
"node_modules",
......
......@@ -138,6 +138,8 @@ module.exports = function (grunt) {
function createConfig(mpConfig) {
mpConfig = _.extend({
base: 'src',
modelDir: 'model',
viewDir: 'view',
}, mpConfig);
var holyGrailTmp = '.grunt/holygrail';
......@@ -235,7 +237,7 @@ module.exports = function (grunt) {
options: _.extend({}, mpConfig[name].modelOptions, modelOptions, mpConfig[name].browserOptions, browserOptions),
files: {
src: [
mpConfig.base + '/scripts/model/**/*.js',
mpConfig.base + '/scripts/' + mpConfig.modelDir + '/**/*.js',
],
},
},
......@@ -243,7 +245,7 @@ module.exports = function (grunt) {
options: _.extend({}, mpConfig[name].viewOptions, viewOptions, mpConfig[name].browserOptions, browserOptions),
files: {
src: [
mpConfig.base + '/scripts/view/**/*.js',
mpConfig.base + '/scripts/' + mpConfig.viewDir + '/**/*.js',
],
},
},
......@@ -359,7 +361,7 @@ module.exports = function (grunt) {
},
src: [
htmlSourceDir + '/!(scripts){,**/}*.html',
htmlSourceDir + '/scripts/view/**/*.html',
htmlSourceDir + '/scripts/' + mpConfig.viewDir + '/**/*.html',
],
},
};
......@@ -373,8 +375,9 @@ module.exports = function (grunt) {
assetsDirs: ['dist/build'],
},
src: [
'dist/build/!(scripts){,**/}*.html',
'dist/build/scripts/view/**/*.html',
'dist/build/**/*.html',
'!dist/build/scripts/**/*.html',
'dist/build/scripts/' + mpConfig.viewDir + '/**/*.html',
],
},
};
......
{
"name": "grunt-monty-python",
"version": "2016.05.25-1",
"version": "2016.05.27-0",
"description": "Build system for grunt",
"license": "BSD",
"repository": {
......