GithubHelp home page GithubHelp logo

thetechstech / composer-installers-extender Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oomphinc/composer-installers-extender

0.0 0.0 0.0 19 KB

Extend the composer/installers plugin to accept any arbitrary package type.

License: MIT License

PHP 100.00%

composer-installers-extender's Introduction

Composer Installers Extender

The composer-installers-extender is a plugin for Composer that allows any package to be installed to a directory other than the default vendor directory within a project on a package-by-package basis. This plugin extends the composer/installers plugin to allow any arbitrary package type to be handled by their custom installer.

The composer/installers plugin has a finite set of supported package types and we recognize the need for any arbitrary package type to be installed to a specific directory other than vendor. This plugin allows additional package types to be handled by the composer/installers plugin, benefiting from their explicit install path mapping and token replacement of package properties.

How to Install

Add universal/composer-installers-extender as a dependency of your project:

$ composer require universal/composer-installers-extender

This plugin requires at least PHP 5.6. If you're using a lower version of PHP use the latest stable 1.x release:

$ composer require universal/composer-installers-extender:^1.1

How to Use

The composer/installers plugin is a dependency of this plugin and will be automatically required as well if not already required.

To support additional package types, add an array of these types in the extra property in your composer.json:

{
    "extra": {
        "installer-types": ["library"]
    }
}

Then, you can add mappings for packages of these types in the same way that you would add package types that are supported by composer/installers:

{
    "extra": {
        "installer-types": ["library"],
        "installer-paths": {
            "special/package/": ["my/package"],
            "path/to/libraries/{$name}/": ["type:library"]
        }
    }
}

By default, packages that do not specify a type will be considered the type library. Adding support for this type allows any of these packages to be placed in a different install path.

If a type has been added to installer-types, the plugin will attempt to find an explicit installer path in the mapping. If there is no match either by name or by type, the default installer path for all packages will be used instead.

Please see the README for composer/installers to see the supported syntax for package and type matching as well as the supported replacement tokens in the path (e.g. {$name}).

License

MIT License

composer-installers-extender's People

Contributors

balbuf avatar bendoh avatar cfoellmann avatar thetechstech avatar webflo avatar xedinunknown avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.