• Stars
    star
    234
  • Rank 171,109 (Top 4 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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 oomphinc/composer-installers-extender as a dependency of your project:

$ composer require oomphinc/composer-installers-extender

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

$ composer require oomphinc/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:

with composer/installers < v1.0.13:

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

with composer/installers >= v1.0.13:

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

Then refer to that type when adding to installer-paths:

with composer/installers < v1.0.13:

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

with composer/installers >= v1.0.13:

{
    "extra": {
        "installer-types": ["drupal-library"],
        "installer-paths": {
            "special/package/": ["my/package"],
            "path/to/libraries/{$name}/": ["type:drupal-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

More Repositories

1

WP-Forms-API

Drupal-esque API for creating and munging forms in WordPress
PHP
56
star
2

drupal-scaffold

An opinionated Drupal scaffold project
PHP
19
star
3

colorcube

Brand Color Palette Accessibility Color Checker Tool
JavaScript
14
star
4

gravity-forms-google-places

Adds a location field type that integrates with the Google Places API.
PHP
13
star
5

braces

Braces is a starter theme that is meant for getting development teams up and running on WordPress projects quickly.
PHP
12
star
6

d8-google-login

Login to Drupal 8 using your Google account
PHP
12
star
7

Oomph-Dummy-Content

Generate a variety of dummy content for your WordPress install!
PHP
8
star
8

wp-dfp

A simple and intuitive interface for displaying Google DFP ads on your WP site
PHP
6
star
9

scss-scaffold

A starter SCSS package to keep our projects consistent.
CSS
5
star
10

Web-Foundation

PHP
4
star
11

view-all-posts-pages

The View All Post's Pages WordPress plugin
PHP
3
star
12

sharedcount

SharedCount WP plugin
PHP
3
star
13

braces-foundation

Braces + Foundation is a starter theme that is meant for getting development teams up and running on WordPress projects quickly using the Foundation Grid system.
CSS
3
star
14

origins

A responsive starting point for Drupal theme developers.
PHP
2
star
15

layout-builder-demo

PHP
2
star
16

oomph-hidden-tags

Oomph Hidden Tags WP Plugin
PHP
2
star
17

wordpress-styleguide-plugin

PHP
2
star
18

gravity-forms-term-select

Adds a field type that allows for selecting terms when submitting forms.
PHP
2
star
19

WP-Post-Type-Nav-Menus

Allow post type archives to be added to nav menus
PHP
2
star
20

WP-Remember-The-Galleries

Extend the WP Media Manager to allow for named galleries with their own metadata that can be re-used between posts
PHP
2
star
21

patterns

This is a repository is for creating reusable chunks of code that we can store and optimize.
PHP
2
star
22

content-mixer

Examples to implement front-end content mixing
PHP
2
star
23

export-structure

Export your Drupal's site structure without data (e.g. vocabularies, fields, field instances, etc)
1
star
24

oomph-grey-matter

Grey Matter is a starter kit for responsive prototypes built with Jekyll & Bootstrap 4.
SCSS
1
star
25

oomph-clone-widgets

Oomph Clone Widgets WP Plugin
PHP
1
star
26

cross-browser-screenshots

Create screenshots via CrossBrowserTesting from a list of urls.
PHP
1
star
27

oomph-ux-buildkit

JavaScript
1
star
28

oomph-plugin-notes

WordPress plugin to allow for arbitrary notes to be attached to plugins to clarify the usage for clients.
PHP
1
star
29

bases

WordPress base classes that help expedite theme and plugin development
PHP
1
star
30

oomph-filter-widgets

Filter widgets by name in WordPress
PHP
1
star
31

WP-Term-Meta

Simple term meta that doesn't pollute the options table or use its own table... Just pollutes wp_posts!
PHP
1
star