vanio/symlink-handler

Composer script handling symlinks

dev-master / 0.1.x-dev 2016-10-29 05:08 UTC

This package is auto-updated.

Last update: 2024-12-05 01:44:07 UTC


README

Build Status Coverage Status PHP7 License

Composer script handling creation of symlinks from your selected installed dependencies to location of your choice.

Installation

Installation can be done as usually using composer. composer require vanio/symlink-handler

Usage

Add the following in your root composer.json file:

"require": {
    "vanio/symlink-handler": "dev-master",
    "components/jquery": "2.2.1"
},
"scripts": {
    "post-install-cmd": [
        "Vanio\\SymlinkHandler\\ScriptHandler::createSymlinks"
    ],
    "post-update-cmd": [
        "Vanio\\SymlinkHandler\\ScriptHandler::createSymlinks"
    ]
},
"extra": {
    "symlinks": {
        "components": "web/vendor/components"
    }
}

After running either composer install or composer update, jquery will be accessible from your web folder web/vendor/components/jquery/jquery.min.js.

But of course, you have to be careful when making symlinks to a folder which is publicly accessible.