From 4f152aa959f0a88f983c538475cbd6002b7da828 Mon Sep 17 00:00:00 2001 From: lpeidro Date: Wed, 23 Oct 2024 14:45:56 +0200 Subject: [PATCH] Improve parameter names --- README.md | 6 +++--- src/InstallerPlugin.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f31d371..449dec4 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ A library that extends and improves the default options provided by [BackstopJS] ``composer require --dev metadrop/backstopjs-addons`` -You can override the default destination of the library by adding the following parameter to the extra section +You can override the default destination of the library ("tests/backstopjs/common/libraries/backstopjs-addons") by adding the following parameter to the extra section of your project's composer.json file: ```json "extra": { - "backstop-addons": { - "destinition": "custom/destinition" + "backstopjs-addons": { + "path": "custom/destination" } ``` \ No newline at end of file diff --git a/src/InstallerPlugin.php b/src/InstallerPlugin.php index fe5ccce..6f73799 100644 --- a/src/InstallerPlugin.php +++ b/src/InstallerPlugin.php @@ -54,8 +54,8 @@ public function MoveFiles(Event $event) { $root = $composer->getConfig()->get('vendor-dir') . '/..'; $extra = $composer->getPackage()->getExtra(); - $backstop_addons_extras = $extra['backstop-addons'] ?? []; - $destination = $backstop_addons_extras['destination'] ?? 'tests/backstopjs/common/libraries/backstopjs-addons'; + $backstop_addons_extras = $extra['backstopjs-addons'] ?? []; + $destination = $backstop_addons_extras['path'] ?? 'tests/backstopjs/common/libraries/backstopjs-addons'; $destination = "{$root}/{$destination}"; if (is_dir($destination)) {