Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach committed Jun 18, 2015
1 parent 48a1218 commit 6f65409
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,37 @@

Allows installation of Components via [Composer](http://getcomposer.org).

## Install

```
composer require robloach/component-installer
```

``` json
{
"require": {
"robloach/component-installer": "*"
}
}
```

## Usage

To install a Component with Composer, add the Component to your *composer.json*
`require` key. The following will install both [jQuery](http://jquery.com) and
[normalize.css](http://necolas.github.io/normalize.css/):
`require` key. The following will install [jQuery](http://jquery.com) and
[normalize.css](https://github.com/necolas/normalize.css):

```
composer require components/jquery
composer require components/normalize.css
```

``` json
{
"require": {
"components/jquery": "1.9.*",
"components/normalize.css": "2.*",
"robloach/component-installer": "0.1.*"
"components/jquery": "2.*",
"components/normalize.css": "3.*",
"robloach/component-installer": "*"
}
}
```
Expand All @@ -25,7 +44,7 @@ Components manually using a `script` or `link` tag:

``` html
<script src="components/jquery/jquery.js"></script>
<link href="components/normalize/normalize.css" rel="stylesheet" type="text/css">
<link href="components/normalize/normalize.css" rel="stylesheet">
```

For complex projects, a [RequireJS](http://requirejs.org) configuration is
Expand Down Expand Up @@ -286,26 +305,6 @@ Using `extra` with packages that ship with Component Installer, will override co
}
```

### Backwards Compatibility

Newer versions of composer made backwards incompatible changes to the way
plugins work. In order for `component-installer` to work on newer versions of
Composer, a backwards incompatibile fix had to be made. If you are using an
older version of composer, please make sure to explicitly require version
`0.0.12` in your root `composer.json` file. Example:

``` json
{
"require": {
"robloach/component-installer": "0.0.12",
"components/jquery": "*"
},
"config": {
"component-dir": "public"
}
}
```

## Not Invented Here

There are many other amazing projects from which Component Installer was
Expand Down

0 comments on commit 6f65409

Please sign in to comment.