Skip to content

Commit

Permalink
Improve parameter names
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeidro committed Oct 23, 2024
1 parent 15b1db2 commit 4f152aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```

4 changes: 2 additions & 2 deletions src/InstallerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 4f152aa

Please sign in to comment.