diff --git a/README.md b/README.md index 91a4dff..7f98560 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,12 @@ Example "type":"mage", "structure":"file", "path":"just a random file path" + }, + { + "type":"magelib", + "structure":"dir", + "path":"SomeNamespace", + "from":"vendor/foo/bar/src/SomeNamespace" } ] } @@ -138,6 +144,9 @@ It is very similar to modman but you need to tell magento the type, if it is a f `path` is the path to your source files. +If you want to include an external library in your package, but on your machine it's located in another path (because +it is a dependency installed via composer), you may specify the real path `from`. + History ======= This script was developed first within [https://github.com/Flagbit/Magento-FilterUrls]. diff --git a/src/shell/packager.php b/src/shell/packager.php index 0e368f4..c90db48 100644 --- a/src/shell/packager.php +++ b/src/shell/packager.php @@ -191,6 +191,14 @@ public function getContent() $ignore = $element->ignore; } + if(isset($element->from)) { + $mageTargets = new Mage_Connect_Package_Target(); + $targetMap = $mageTargets->getTargets(); + + $link = BP . DS . $targetMap[$element->type] . DS . $element->path; + symlink(BP . DS . $element->from, $link); + } + $contents["target"][$i] = $element->type; $contents["type"][$i] = $element->structure; $contents["path"][$i] = $element->path;