<h1>The Background</h1>
I'm trying to use <a href="http://getcomposer.org" rel="nofollow">Composer</a> to manage dependencies for WordPress plugins. I've built several PHP libraries <em>(<a href="https://github.com/newclarity/restian/" rel="nofollow">RESTian</a> & <a href="https://github.com/newclarity/sidecar/" rel="nofollow">Sidecar</a>)</em> I want to include in subdirectories for each of several plugins we are building and those PHP libraries are hosted on GitHub. The WordPress plugins are <em>(currently)</em> hosted in private BitBucket repos as they are for clients but those plugins will also get published to WordPress plugin repository when we are ready to release them.
<h1>The Problem</h1>
I want a directory structure of
and
relative to the root of the plugin. For those who know WordPress they would ultimately look like this installed:
Problem is I've only been able to get Composer to put them within a
subdirectory which is more complexity than I want to add to the directory structure of the plugin <em>(
is our GitHub account)</em>:
<h1>The Source</h1>
Here is the
file that I am using to research and test this:
And here are the current
files from the libraries hosted at GitHub:
And:
I've been researching this for over 4 hours now. Any help would be appreciated.
-Mike
I'm trying to use <a href="http://getcomposer.org" rel="nofollow">Composer</a> to manage dependencies for WordPress plugins. I've built several PHP libraries <em>(<a href="https://github.com/newclarity/restian/" rel="nofollow">RESTian</a> & <a href="https://github.com/newclarity/sidecar/" rel="nofollow">Sidecar</a>)</em> I want to include in subdirectories for each of several plugins we are building and those PHP libraries are hosted on GitHub. The WordPress plugins are <em>(currently)</em> hosted in private BitBucket repos as they are for clients but those plugins will also get published to WordPress plugin repository when we are ready to release them.
<h1>The Problem</h1>
I want a directory structure of
Code:
/libraries/restian/
Code:
/libraries/sidecar/
Code:
/wp-content/plugins/my-wp-plugin/libraries/restian/
/wp-content/plugins/my-wp-plugin/libraries/sidecar/
Problem is I've only been able to get Composer to put them within a
Code:
/newclarity/
Code:
'newclarity'
Code:
/wp-content/plugins/my-wp-plugin/libraries/newclarity/restian/
/wp-content/plugins/my-wp-plugin/libraries/newclarity/sidecar/
<h1>The Source</h1>
Here is the
Code:
composer.json
Code:
{
"name":"mikeschinkel/my-wp-plugin",
"description":"My WordPress Plugin",
"type":"wordpress-plugin",
"config":{
"vendor-dir":"libraries/"
},
"require": {
"newclarity/restian":"dev-master",
"newclarity/sidecar":"dev-master"
},
"repositories":[
{
"type":"git",
"url":"https://github.com/newclarity/restian.git"
},
{
"type":"git",
"url":"https://github.com/newclarity/sidecar.git"
}
]
}
And here are the current
Code:
composer.json
Code:
{
"name": "newclarity/restian",
"description": "RESTian: A base class library to simplify building RESTful/Web API clients in PHP",
"require": {
"php": ">=5.2.4"
}
}
And:
Code:
{
"name": "newclarity/sidecar",
"description": "Sidecar: The Missing Plugin API for WordPress",
"require":{
"php":">=5.2.4"
}
}
I've been researching this for over 4 hours now. Any help would be appreciated.
-Mike