Skip to content

Instantly share code, notes, and snippets.

@khoand0000
Last active August 29, 2015 14:09
Show Gist options
  • Save khoand0000/bdb0f9ee31465199801e to your computer and use it in GitHub Desktop.
Save khoand0000/bdb0f9ee31465199801e to your computer and use it in GitHub Desktop.
composer - packages.json: create project from packages.json (packages.json contains location of source (.zip), .zip contains composer.json describe information of module) composer create-project --repository-url packages.json acme/hello-world
/*
ref: http://roots.io/using-composer-with-wordpress/
*/
{
"repositories": [
{
"type": "package",
"package": {
"name": "wordpress",
"type": "webroot",
"version": "3.8",
"dist": {
"type": "zip",
"url": "https://github.com/WordPress/WordPress/archive/3.8.zip"
},
"require" : {
"fancyguy/webroot-installer": "1.0.0"
}
}
}
],
"require": {
"php": ">=5.3.0",
"wordpress": "3.8",
"fancyguy/webroot-installer": "1.0.0"
},
"extra": {
"webroot-dir": "wp",
"webroot-package": "wordpress"
}
}
where: ~/.composer/cache/files
delete: rm -rf ~/.composer/cache/files/...
{
"acme/hello-world": {
"name": "acme/hello-world",
"version": "1.0.0",
"dist": {
"type": "zip",
"url": "http://localhost/yii20/Archive.zip"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment