mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +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
|
||||
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': {
|
||||
|
||||
Reference in New Issue
Block a user