What it does
A 'Build' extension allows you to specify extra steps to take when your application is built. This may be necessary, for example, if any data must be compiled or otherwise modified, or if any data needs to be imported into the database during the application build process. Build extensions are used to compile CKEditor and to minify CodeMirror files, for example.
How it works
The extension supports two methods. The first method, build(), performs the actual processing during the build process.
/**
* Build
*
* @return void
* @throws \RuntimeException
*/
public function build()
{
// Do your work here
}
The second method, finish(), allows you to do any post-processing cleanup if necessary. For instance, if you copied some files temporarily to perform some processing on them, you may wish to use this method to delete them; or you may want to set a flag when the build process starts and then remove that flag when the process has ended.
Report Document