Download the PHP package operations/composer-project-bins without Composer
On this page you can find all versions of the php package operations/composer-project-bins. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download operations/composer-project-bins
More information about operations/composer-project-bins
Files in operations/composer-project-bins
Package composer-project-bins
Short Description Include bin scripts in top level composer projects.
License MIT
Informations about the package composer-project-bins
Project Bin Scripts
Your scripts in the Composer bin-dir.
This plugin allows you to add your own scripts as composer bins to projects.
It works just like dependent packages "bin" scripts work: a link is created from your vendor bin directory to the script.
Advantages:
- All commands for your project can be run from the same directory, the vendor bin dir.
- The composer bin dir and autoloader path are available via bash or PHP variables.
- Scripts can use ensure they are calling exact versions of scripts such as
drush
ornpm
by including this path.
See Composer "Vendor Binaries" Documentation for more information.
Usage
-
Install the plugin.
-
Create a script file.
-
Add to
composer.json
: -
Run composer install:
-
Run your script from the composer bin path:
Or, if you set PATH, just use the command.
NOTE about composer schema for "bin"
This is the same configuration used by composer.json
schema for dependencies.
Using this same config here might cause some confusion.
The main reason this was used is so the plugin could use the exact same code to install project binaries as it does dependency binaries.
If you think this is confusing and should change, please submit a pull request.
About
- Created by: Jon Pugh