I have a Github repository, which I recently submitted to Packagist. The top-level directory of my repository is as follows:
- build/
- bootsole/
- examples/
- licenses/
- screenshots/
The bootsole
subdirectory is the actual directory containing the classes that are managed/autoloaded by composer.
I tried creating a new project, to test the package. In the new project, my composer.json
is as follows:
{
"require": {
"php": ">=5.4.0",
"alexweissman/bootsole": "0.2.0"
}
}
I run composer install
, and it fetches bootsole
and its dependency, valitron
. However, it places bootsole in vendor/alexweissman/bootsole/
, and what's more, it places the entire repository in that directory - not just the bootsole
subdirectory.
Is it possible to configure a package to only include the contents of the subdirectory bootsole
(i.e., omit build/
, examples/
, etc)?
Update: This question seems to suggest that it isn't possible (though the question is over a year old at this point). It suggests that I tell git to ignore the other directories in the archive, which I'd rather not do for the benefit of developers who don't use composer.
Is there perhaps a way to create a separate branch that contains only the bootsole/
subdirectory, point Composer to that branch, and somehow auto-synchronize Composer's branch with the master branch?