2017 © Pedro Peláez
 

composer-plugin drupal-library-mapping

A helper for installing library assets for Drupal.

image

bmcclure/drupal-library-mapping

A helper for installing library assets for Drupal.

  • Friday, July 14, 2017
  • by bmcclure
  • Repository
  • 1 Watchers
  • 1 Stars
  • 99 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 4 % Grown

The README.md

drupal-library-mapping

A helper for installing library assets for Drupal., (*1)

By using Asset Packagist, you can already install Drupal assets into the right location., (*2)

But, what about packages that aren't named the way a Drupal module is expecting?, (*3)

This package both includes common name mappings already, and allows you to specify your own in composer.json., (*4)

Then, it will symlink, copy, or move the mapped assets to the right location whenever they are installed or updated., (*5)

How to use the plugin

First, require "bmcclure/drupal-library-mapping"., (*6)

Enable Asset Packagist support following their instructions., (*7)

Configure the following in extra:, (*8)

"installer-types": ["library", "drupal-library", "bower-asset", "npm-asset"],
"installer-paths": {
    "libraries/{$name}": [
        "type:drupal-library",
        "type:bower-asset",
        "type:npm-asset"
    ]
}

Now simply require assets from Asset Packagist, and they'll be mapped appropriately., (*9)

Customizing the copy type

By default, the mapped plugins are copied., (*10)

Add the following to extras to customize the method used for mapping:, (*11)

"drupal-library-mapping-type": "symlink"

Accepted values are "copy" (the default), "symlink", and "move"., (*12)

Note that a side effect of using "move" is that composer will reinstall the package every time it runs., (*13)

Customizing the package name map

You may wish to map other library names to common ones., (*14)

You can add new mappings to the "drupal-library-mapping" key in extras., (*15)

Example:, (*16)

"drupal-library-mapping": {
    "jquery-easing-original": "easing"
}

The Versions

14/07 2017

dev-master

9999999-dev

A helper for installing library assets for Drupal.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

14/07 2017

0.1.2

0.1.2.0

A helper for installing library assets for Drupal.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

05/05 2017

0.1.1

0.1.1.0

A helper for installing library assets for Drupal.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

04/05 2017

0.1.0

0.1.0.0

A helper for installing library assets for Drupal.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.5
  • composer-plugin-api ^1.0.0

 

The Development Requires