Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add name property to installer-paths for type:drupal-library. #1183

Closed
greylabel opened this issue Mar 14, 2017 · 0 comments
Closed

Add name property to installer-paths for type:drupal-library. #1183

greylabel opened this issue Mar 14, 2017 · 0 comments
Labels
Bug Something isn't working

Comments

@greylabel
Copy link
Contributor

Problem/Motivation:

Contrib often requires libraries to be installed to Drupal's docroot/libraries in a specifically named directories that can differer from the defaults provided by the libraries themselves. The webform module is an example. Although it provides drush commands and a drush make file, it does not out of the box provide a composer friendly solution.

Proposed resolution:

Add the name property to installer-paths for type:drupal-library in the template composer.json.

"docroot/libraries/{$name}": [
  "type:drupal-library"
],

This will allow specifying an arbitrary the directory name in docroot/libraries for libraries installed with composer. Example below.

"repositories": {
    ...
    "intl-tel-input": {
        "type": "package",
        "package": {
            "name": "jquery/intl-tel-input",
            "version": "v11.0.0",
            "type": "drupal-library",
            "extra": {
                "installer-name": "jquery.intl-tel-input"
            },
            "dist": {
                "url": "https://github.com/jackocnr/intl-tel-input/archive/v11.0.0.zip",
                "type": "zip"
            },
            "require": {
                "composer/installers": "~1.0"
            }
        }
    }
},
"require": {
    ...
    "jquery/intl-tel-input": "v11.0.0"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants