Make the build warn if attempting to combine template with other commands.

Former-commit-id: be47695b4f5315725b6e5520c6ccf3544c220d3a
This commit is contained in:
John-David Dalton
2013-06-30 14:33:36 -07:00
parent 292cdfd5a0
commit 68dc6b9527

View File

@@ -2360,13 +2360,17 @@
}
// report invalid command combinations
invalidArgs = _.intersection(options, ['backbone', 'legacy', 'mobile', 'modern', 'underscore']);
if (invalidArgs.length > 1) {
warnings.push('The `' + invalidArgs.slice(0, -1).join('`, `') + '`' + (invalidArgs.length > 2 ? ',' : '') + ' and `' + _.last(invalidArgs) + '` commands may not be combined.');
if (isTemplate) {
invalidArgs.push('template');
}
if (invalidArgs.length > 2) {
warnings.push('The `' + invalidArgs.slice(0, -1).join('`, `') + '`' + (invalidArgs.length > 2 ? ',' : '') + ' and `' + invalidArgs.slice(-1) + '` commands may not be combined.');
}
// report invalid command entries
_.forOwn({
'category': {
'entries': categories,
'entries': categoryOptions,
'validEntries': allCategories
},
'exports': {