updating the supported composer events

This commit is contained in:
Dave Olsen 2015-03-06 20:19:33 -05:00
parent 60f2eda25e
commit 8789b94ea7
2 changed files with 20 additions and 2 deletions

View File

@ -32,8 +32,8 @@
"pattern-lab/styleguidekit-twig-default": "dev-dev"
},
"scripts": {
"pre-install-cmd": [
"PatternLab\\Installer::preInstallCmd"
"post-create-project-cmd": [
"PatternLab\\Installer::postCreateProjectCmd"
],
"post-package-install": [
"PatternLab\\Installer::postPackageInstall"
@ -41,6 +41,9 @@
"post-package-update": [
"PatternLab\\Installer::postPackageUpdate"
],
"pre-install-cmd": [
"PatternLab\\Installer::preInstallCmd"
],
"pre-package-uninstall": [
"PatternLab\\Installer::prePackageUninstall"
]

View File

@ -18,6 +18,21 @@ use \PatternLab\InstallerUtil;
class Installer {
/**
* Run the PL tasks when a package is installed
* @param {Object} a script event object from composer
*/
public static function postCreateProjectCmd(Event $event) {
// make sure pattern lab has been loaded
if (class_exists("\PatternLab\Config")) {
InstallerUtil::postCreateProjectCmd($event);
}
}
/**
* Run the PL tasks when a package is installed
* @param {Object} a script event object from composer