Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 8789b94

Browse files
committed
updating the supported composer events
1 parent 60f2eda commit 8789b94

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@
3232
"pattern-lab/styleguidekit-twig-default": "dev-dev"
3333
},
3434
"scripts": {
35-
"pre-install-cmd": [
36-
"PatternLab\\Installer::preInstallCmd"
35+
"post-create-project-cmd": [
36+
"PatternLab\\Installer::postCreateProjectCmd"
3737
],
3838
"post-package-install": [
3939
"PatternLab\\Installer::postPackageInstall"
4040
],
4141
"post-package-update": [
4242
"PatternLab\\Installer::postPackageUpdate"
4343
],
44+
"pre-install-cmd": [
45+
"PatternLab\\Installer::preInstallCmd"
46+
],
4447
"pre-package-uninstall": [
4548
"PatternLab\\Installer::prePackageUninstall"
4649
]

core/src/PatternLab/Installer.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@
1818

1919
class Installer {
2020

21+
/**
22+
* Run the PL tasks when a package is installed
23+
* @param {Object} a script event object from composer
24+
*/
25+
public static function postCreateProjectCmd(Event $event) {
26+
27+
// make sure pattern lab has been loaded
28+
if (class_exists("\PatternLab\Config")) {
29+
30+
InstallerUtil::postCreateProjectCmd($event);
31+
32+
}
33+
34+
}
35+
2136
/**
2237
* Run the PL tasks when a package is installed
2338
* @param {Object} a script event object from composer

0 commit comments

Comments
 (0)