patternlab-php-core
patternlab-php-core copied to clipboard
add an install script hook to composer extras
A feature request: allow misc scripts to run after starterkit installation (e.g., to move things around).
It seems a little silly to replicate composer behavior like this, but it's just a quick hack into the composer['extras']['patternlab'] used by the starterkit fetcher.
Requires https://github.com/pattern-lab/patternlab-php-core/pull/108 to work, and you can test something like:
{
"name": "test/test-starterkit",
"description": "test PL starterkit.",
"keywords": ["twig", "pattern lab", "starterkit"],
"type": "patternlab-starterkit",
"require": {
"pattern-lab/core": "^2.0.0",
"pattern-lab/patternengine-twig": "^2.0.0"
},
"extra": {
"patternlab": {
"dist": {
"sourceDir": [
{ "*": "*" }
]
},
"installScripts": [
"install/setup.php"
]
}
}
}