Skip to content

emacs-php/composer.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

composer.el

MELPA: composer MELPA stable: composer

Composer interface for Emacs.

Specification

See Composer Documentation. composer.el supports Environment variables (currently we support only COMPOSER_BIN_DIR and COMPOSER_HOME).

Commands

commanddescription
M-x composerRun composer sub command (with completing read)
C-u M-x composerRun composer (global) sub command (with completing read)
M-x composer-installRun composer install command
M-x composer-requireRun composer require command
C-u M-x composer-requireRun composer require --dev command
M-x composer-updateRun composer update command
M-x composer-dump-autoloadRun composer dump-autoload command
M-x composer-run-scriptRun composer run-script command
M-x composer-run-vendor-bin-commandRun command in vendor/bin
M-x composer-find-json-fileOpen composer.json of the project
M-x composer-view-lock-fileOpen composer.lock of the project (as read-only)

API

Function composer-get-config(name)

(composer-get-config "bin-dir") ;=> "vendor/bin"

Function composer-get-bin-dir()

(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"

Special variable composer-use-managed-phar

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))