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

Added composer.json so package can be managed by Composer #1

Merged
merged 1 commit into from Apr 8, 2015

Conversation

khromov
Copy link
Contributor

@khromov khromov commented Apr 7, 2015

Added composer.json so this plugin can be installed and version managed by Composer.

More info:
http://composer.rarst.net/recipe/paths-control

Let me know if you have any questions!

Added composer.json so this plugin can be managed by Composer.

See:
http://composer.rarst.net/recipe/paths-control
lucasstark added a commit that referenced this pull request Apr 8, 2015
Added composer.json so package can be managed by Composer
@lucasstark lucasstark merged commit 4ac95d3 into lucasstark:master Apr 8, 2015
@khromov khromov deleted the add-composer-json branch April 8, 2015 14:22
@khromov
Copy link
Contributor Author

khromov commented Apr 8, 2015

Here is a complete example of how to use this with Composer:

composer.json

{
  "name": "my-project",
  "description": "",
  "license": "GPL",

  "repositories": [
    { "type": "vcs", "url": "git@github.com:lucasstark/acf-child-post-field.git" }
    ],

  "require": {
    "lucasstark/acf-child-post-field": "dev-master"
  },
  "extra": {
    "installer-paths": {
      "wordpress/wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
    }
  }
}

@lucasstark If you register the package on https://packagist.org/ we can remove the VCS source:

composer.json

{
  "name": "my-project",
  "description": "",
  "license": "GPL",

  "require": {
    "lucasstark/acf-child-post-field": "dev-master"
  },
  "extra": {
    "installer-paths": {
      "wordpress/wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
    }
  }
}

Branches can be chosen by using dev-BRANCH_NAME as the version. GitHub releases can be used as versions as well, more info:
https://getcomposer.org/doc/01-basic-usage.md#package-versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants