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)) {