diff --git a/bin/bower_new b/bin/bower_new index 57b504a8..1cb6cd3f 100755 --- a/bin/bower_new +++ b/bin/bower_new @@ -86,5 +86,5 @@ notifier = updateNotifier({ }); if (notifier.update && levels.info >= loglevel) { - renderer.updateAvailable(notifier.update); + renderer.updateNotice(notifier.update); } \ No newline at end of file diff --git a/lib/renderers/StandardRenderer.js b/lib/renderers/StandardRenderer.js index 4fabb0f6..45f96bbd 100644 --- a/lib/renderers/StandardRenderer.js +++ b/lib/renderers/StandardRenderer.js @@ -66,11 +66,13 @@ StandardRenderer.prototype.notification = function (notification) { } }; -StandardRenderer.prototype.updateAvailable = function (update) { - // TODO +StandardRenderer.prototype.updateNotice = function (data) { + template('std/update-notice.std', data) + .then(function (str) { + this._write(process.stderr, str); + }.bind(this), this.error.bind(this)); }; - // ------------------------- StandardRenderer.prototype._install = function (installed) { diff --git a/templates/std/update-notice.std b/templates/std/update-notice.std new file mode 100644 index 00000000..e214b7f3 --- /dev/null +++ b/templates/std/update-notice.std @@ -0,0 +1,4 @@ +{{#red}}-----------------------------------------{{/red}} +Update available: {{#yellow}}{{latest}}{{/yellow}} {{#cyan}}(current: {{current}}){{/cyan}} +Run {{#yellow}}npm update -g {{name}}{{/yellow}} to update +{{#red}}-----------------------------------------{{/red}} \ No newline at end of file