Skip to content

Commit

Permalink
Update readme about asset packagist.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoaguilera committed Jun 25, 2017
1 parent 929dca8 commit 8544eb1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,26 @@ section of composer.json:
### How do I switch from packagist.drupal-composer.org to packages.drupal.org?

Follow the instructions in the [documentation on drupal.org](https://www.drupal.org/docs/develop/using-composer/using-packagesdrupalorg).

### How can I add libraries using composer.json?

It is possible to use libraries with composer with thank to the
asset-packagist repository (https://asset-packagist.org/).

For example, to use colorbox:
```
composer require npm-asset/colorbox:"^0.4"
```
Composer will detect new versions of the library that meet your constraints.
In the above example it will download anything from the series of the 0.4.*
series of colorbox

When managing libraries with composer this way, you may not want to add it to
version control. In that case, add specific directories to the .gitignore file.
```
# Specific libraries (which we manage with composer)
docroot/libraries/colorbox
```

For more details, see https://asset-packagist.org/site/about

0 comments on commit 8544eb1

Please sign in to comment.