tbbc / composer-javascript
Composer script handler for executing `npm install` and `bower install` automatically.
Installs: 16 374
Dependents: 1
Suggesters: 0
Security: 0
Stars: 17
Watchers: 7
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
- symfony/process: >=2.0,<3.0
This package is not auto-updated.
Last update: 2024-11-23 15:42:33 UTC
README
Composer script handler for executing npm install
and bower install
automatically
after the composer install
(or update) command.
Usage
Add this lines to your composer.json file:
{ "require": { "tbbc/composer-javascript": "~1.0" }, "scripts": { "post-install-cmd": [ "Tbbc\\ComposerJavascript\\ScriptHandler::npmInstall", "Tbbc\\ComposerJavascript\\ScriptHandler::bowerInstall" ], "post-update-cmd": [ "Tbbc\\ComposerJavascript\\ScriptHandler::npmInstall", "Tbbc\\ComposerJavascript\\ScriptHandler::bowerInstall" ] } }
You can freely add both or just one of the npmInstall
or bowerInstall
scripts.
Options
For users that work with a Samba sharing or like, you can pass an option for npm install
to prevent using
symlinks for binaries.
Just add the following to your composer.json file:
"extra": { "tbbc-composer-javascript": { "npm-bin-links": false } }
npm-bin-links
default value is true
.