Composer interface for Emacs.
See Composer Documentation. composer.el
supports Environment variables (currently we support only COMPOSER_BIN_DIR
and COMPOSER_HOME
).
command | description |
---|---|
M-x composer | Run composer sub command (with completing read) |
C-u M-x composer | Run composer (global) sub command (with completing read) |
M-x composer-install | Run composer install command |
M-x composer-require | Run composer require command |
C-u M-x composer-require | Run composer require --dev command |
M-x composer-update | Run composer update command |
M-x composer-dump-autoload | Run composer dump-autoload command |
M-x composer-run-script | Run composer run-script command |
M-x composer-run-vendor-bin-command | Run command in vendor/bin |
M-x composer-find-json-file | Open composer.json of the project |
M-x composer-view-lock-file | Open composer.lock of the project (as read-only) |
M-x composer-list-packages | Open the list of packages for the project |
(composer-get-config "bin-dir") ;=> "vendor/bin"
(composer-get-bin-dir) ;=> "/path/to/current-project/vendor/bin"
(let ((composer-global-command t))
(composer-get-bin-dir)) ;=> "/home/your-name/.composer/vendor/bin"
Use latest version of composer.phar
managed by this package. You can always use the latest version of it without having to set up Composer yourself.
(let ((composer-use-managed-phar t)
(default-directory "/path/to/dir"))
(composer-install))