Download the PHP package operations/project-bin-scripts without Composer
On this page you can find all versions of the php package operations/project-bin-scripts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download operations/project-bin-scripts
More information about operations/project-bin-scripts
Files in operations/project-bin-scripts
Package project-bin-scripts
Short Description Include bin scripts in top level composer projects.
License MIT
Informations about the package project-bin-scripts
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