Note: this plugin is in a very early alpha stage.
Roadmap
- Automatic installation of composer.
- Better error catching.
- Possibility to run any composer command.
npm install shipit-composer --save-dev
Just simply run: This triggers the composer
task on the deploy updated
or fetched
event.
shipit staging deploy
Or you can run the tasks separatly :
shipit staging composer:init composer:install
Type: Boolean
Default: true
A Boolean to determine whether to run the task in local workspace or on the remote.
Type: Array
or String
Default: []
An array or string specifying composer args passed to the composer install cmd.
Type: Array
or String
Default: []
An array or string specifying composer flags passed to the composer install cmd.
Type: String
,Boolean
Default: updated
or fetched
(depending on composer.remote
value)
An event name that triggers composer:install
. Can be set to false to prevent the composer:install
task from listening to any events.
Type: String
,
Default: composer
A simple string which gets converted to a path for adding a custom composer-file if the command is not present in the environment. (i.E. shared hosting). Provide absolute path!
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
require('shipit-composer')(shipit);
shipit.initConfig({
default: {
composer: {
remote: false,
installFlags: ['--no-dev', '--prefer-stable']
}
}
});
};
- composer
- composer:init
- Emit event "composer_inited".
- composer:install
- Runs composer install (with any Args
composer.installArgs
or Flagscomposer.installFlags
defined in options) - Emit event "composer_installed"
- Runs composer install (with any Args
- composer:run
- Runs composer command.
- composer:init
- on Event "deploy" (shipit-deploy initialized)
- Runs composer:init
- on Event "composer_inited"
- Runs composer:install (Triggered on the
updated
orfetched
event from shipit-deploy or by a customcomposer.triggerEvent
as mentioned above.)
- Runs composer:install (Triggered on the
MIT
- Fork it ( https://github.com/jeremyzahner/shipit-composer/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request