patternlab-php-core icon indicating copy to clipboard operation
patternlab-php-core copied to clipboard

add an install script hook to composer extras

Open ahebrank opened this issue 9 years ago • 0 comments

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"
      ]
    }
  }
}

ahebrank avatar Dec 22 '16 18:12 ahebrank