affiliatewp/AffiliateWP — pull request #295 by chrisvanpatten (2014-07-12 16:58:57+00:00)
Title: Add composer.json

This PR adds a composer.json file, which would allow AffiliateWP to be installed via [Composer](https://getcomposer.org/), the PHP dependency management tool. I borrowed the format from the [composer.json on Yoast's WordPress SEO plugin](https://github.com/Yoast/wordpress-seo/blob/master/composer.json).

A sample composer.json that adds WordPress core (trunk) and AffiliateWP (the latest tagged version) as dependencies might look like this:

```json
{
"name": "chrisvanpatten/sample-project",
"description": "My Sample Project is great.",
"type": "project",
"repositories": [
{
"type": "vcs",
"url" : "https://github.com/affiliatewp/AffiliateWP",
"no-api": "true"
}
],
"require": {
"johnpbloch/wordpress": "dev-master",
"affiliatewp/AffiliateWP": "*"
},
"extra": {
"wordpress-install-dir": "wp",
"installer-paths": {
"content/plugins/{$name}": ["type:wordpress-plugin"],
"content/mu-plugins/{$name}": ["type:wordpress-muplugin"],
"content/themes/{$name}": ["type:wordpress-theme"]
}
}
}
```

Add this to your project root, install Composer, and run `composer install` and it should automatically install WordPress and your plugins to the paths specified in the "extra" block.