mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Make the build warn if attempting to combine template with other commands.
Former-commit-id: be47695b4f5315725b6e5520c6ccf3544c220d3a
This commit is contained in:
10
build.js
10
build.js
@@ -2360,13 +2360,17 @@
|
|||||||
}
|
}
|
||||||
// report invalid command combinations
|
// report invalid command combinations
|
||||||
invalidArgs = _.intersection(options, ['backbone', 'legacy', 'mobile', 'modern', 'underscore']);
|
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
|
// report invalid command entries
|
||||||
_.forOwn({
|
_.forOwn({
|
||||||
'category': {
|
'category': {
|
||||||
'entries': categories,
|
'entries': categoryOptions,
|
||||||
'validEntries': allCategories
|
'validEntries': allCategories
|
||||||
},
|
},
|
||||||
'exports': {
|
'exports': {
|
||||||
|
|||||||
Reference in New Issue
Block a user