From 39682de40f667c4364ea7e98277f4603a14c424f Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 12 Dec 2019 14:30:00 +0100 Subject: [PATCH] Rename `boxenOpts` option to `boxenOptions` --- index.js | 4 ++-- readme.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 1640fc4..4c5973d 100644 --- a/index.js +++ b/index.js @@ -151,7 +151,7 @@ class UpdateNotifier { options.message = options.message || 'Update available ' + chalk().dim(this.update.current) + chalk().reset(' → ') + chalk().green(this.update.latest) + ' \nRun ' + chalk().cyan(installCommand) + ' to update'; - options.boxenOpts = options.boxenOpts || { + options.boxenOptions = options.boxenOptions || { padding: 1, margin: 1, align: 'center', @@ -159,7 +159,7 @@ class UpdateNotifier { borderStyle: 'round' }; - const message = '\n' + boxen()(options.message, options.boxenOpts); + const message = '\n' + boxen()(options.message, options.boxenOptions); if (options.defer === false) { console.error(message); diff --git a/readme.md b/readme.md index a0a3cc8..3e5b756 100644 --- a/readme.md +++ b/readme.md @@ -158,7 +158,7 @@ Default: Auto-detect Include the `-g` argument in the default message's `npm i` recommendation. You may want to change this if your CLI package can be installed as a dependency of another project, and don't want to recommend a global installation. This option is ignored if you supply your own `message` (see above). -##### boxenOpts +##### boxenOptions Type: `object`\ Default: `{padding: 1, margin: 1, align: 'center', borderColor: 'yellow', borderStyle: 'round'}` *(See screenshot)*