Skip to content

Latest commit

 

History

History
executable file
·
32 lines (21 loc) · 973 Bytes

override.md

File metadata and controls

executable file
·
32 lines (21 loc) · 973 Bytes

Bild Overrides

We leverage PSR-4 for class overrides.

To begin, from within your project root, create the following directory structure:

bild/src/Bild/Console/Command

Adding custom commands to your project

Create a new class that extends BaseCommand within any of the following directories:

  1. Frontend
  2. Initialize
  3. Project
  4. Repo
  5. Testing
  6. Travis
  7. VM

Run bild from the project root and verify your command shows up.

Overriding existing commands in your project

Copy the existing class into the same directory within your project.

For instance, you wish to override the bild project:build-make-file command.

  1. That file resides at src/Bild/Console/Command/Project/BuildMakeFile.php within the Bild repo
  2. Copy that file to your project root within bild/src/Bild/Console/Command/Project/BuildMakeFile.php
  3. Change the command within your project
  4. Run bild project:build-make-file and ensure your changes exist