From 8bdffd75ce19c9cfca72c7bd86166a876feca85e Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Wed, 18 Dec 2013 21:58:20 +0000 Subject: [PATCH 1/2] Add information on how to run scripts manually --- doc/articles/scripts.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/articles/scripts.md b/doc/articles/scripts.md index 4e8d3b7d1..025eb66eb 100644 --- a/doc/articles/scripts.md +++ b/doc/articles/scripts.md @@ -9,7 +9,7 @@ A script, in Composer's terms, can either be a PHP callback (defined as a static method) or any command-line executable command. Scripts are useful for executing a package's custom code or package-specific commands during -the Composer execution process. +the Composer execution process.r **NOTE: Only scripts defined in the root package's `composer.json` are executed. If a dependency of the root package specifies its own scripts, @@ -115,3 +115,11 @@ PHP callback. This `Event` object has getters for other contextual objects: - `getName()`: returns the name of the event being fired as a string - `getIO()`: returns the current input/output stream which implements `Composer\IO\IOInterface` for writing to the console + +## Running scripts manually + +If you would like to run the scripts for an event manually, the syntax is: + + $ composer run-script [--dev] [--no-dev] script + +For example `composer run-script post-install-cmd` will run any **post-install-cmd** scripts that have been defined. From 7799c27df0c16a8f0e62c3f32ab533daf7098723 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Wed, 18 Dec 2013 21:59:10 +0000 Subject: [PATCH 2/2] Removed sneaky typo --- doc/articles/scripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/articles/scripts.md b/doc/articles/scripts.md index 025eb66eb..06e7c784d 100644 --- a/doc/articles/scripts.md +++ b/doc/articles/scripts.md @@ -9,7 +9,7 @@ A script, in Composer's terms, can either be a PHP callback (defined as a static method) or any command-line executable command. Scripts are useful for executing a package's custom code or package-specific commands during -the Composer execution process.r +the Composer execution process. **NOTE: Only scripts defined in the root package's `composer.json` are executed. If a dependency of the root package specifies its own scripts,