WebDevStudios / Taxonomy_Core

A tool to make custom taxonomy registration just a bit simpler. Automatically registers taxonomy labels, and provides helpful methods.
38 stars 11 forks source link

Support custom path via Composer #4

Open grantpalin opened 9 years ago

grantpalin commented 9 years ago

As with CPT Core, it would be useful to also be able to place this dependency in a custom location.

JayWood commented 7 years ago

More details/information on composer paths needed.

jrfoell commented 7 years ago

@grantpalin you can do this right now using the composer-installers-extended library in your project by adding the following to your project's composer.json file:

    "require": {
        "webdevstudios/taxonomy_core": "0.2.4",
        "oomphinc/composer-installers-extender": "dev-master"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/WebDevStudios/Taxonomy_Core"
        }
    ],
    "extra": {
        "installer-paths": {
            "includes/libraries/{$name}": ["webdevstudios/taxonomy_core"]
        }
    }

In the above example, taxonomy core will be installed at includes/libraries/taxonomy_core instead of in the vendors directory (vendor/webdevstudios/taxonomy_core). Other libraries that you don't specify a path for will go in their normal place (typically vendor/)

jrfoell commented 7 years ago

Once PR #15 is merged you'll be able to specify the installation directory without requiring composer-installers-extended by adding the following to your projects's composer.json file:

    "require": {
        "webdevstudios/taxonomy_core": "0.2.4"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/WebDevStudios/Taxonomy_Core"
        }
    ],
    "extra": {
        "installer-paths": {
            "includes/libraries/{$name}": ["webdevstudios/taxonomy_core"]
        }
    }