mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Mismatch now has its custom template.
This commit is contained in:
@@ -272,9 +272,7 @@ Package.prototype.loadJSON = function () {
|
||||
if (this.tag && (cleanedTag = semver.clean(this.tag)) && cleanedTag !== this.version) {
|
||||
// Only print the warning once
|
||||
if (!this.unitWork.retrieve('mismatch#' + this.name + '_' + cleanedTag)) {
|
||||
template('warn', { message: 'The version specified in the ' + config.json + ' of package ' + this.name + ' mismatches the tag (' + cleanedTag + ' vs ' + (this.version || 'N/A') + ')' })
|
||||
.on('data', this.emit.bind(this, 'data'));
|
||||
template('warn', { message: 'Bower will assume the tag ' + cleanedTag + ', but you should report this problem to the package author' })
|
||||
template('warning-mismatch', { name: this.name, json: config.json, tag: cleanedTag, version: this.version || 'N/A' })
|
||||
.on('data', this.emit.bind(this, 'data'));
|
||||
this.unitWork.store('mismatch#' + this.name + '_' + cleanedTag, true);
|
||||
}
|
||||
|
||||
2
templates/warning-mismatch.mustache
Normal file
2
templates/warning-mismatch.mustache
Normal file
@@ -0,0 +1,2 @@
|
||||
{{#yellow}}mismatch{{/yellow}} {{#grey}}The version specified in the{{/grey}} {{json}} {{#grey}}of package {{/grey}}{{name}} {{#grey}}mismatches the tag ({{/grey}}{{#red}}{{tag}}{{/red}} {{#grey}}vs{{/grey}} {{#red}}{{version}}{{/red}}{{#grey}}){{/grey}}
|
||||
{{#yellow}}mismatch{{/yellow}} {{#grey}}You should report this problem to the package author{{/grey}}
|
||||
Reference in New Issue
Block a user