Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.28 KB

extending-blt.md

File metadata and controls

39 lines (23 loc) · 1.28 KB

Extending / Overriding BLT

To add or override a Phing target, you may create a custom build file. You must specify the location of your custom build file using the import key to your project.yml file.

Adding a custom target

  <project name="custom" default="build">
    <!-- Add custom targets. -->
  </project>

Overriding an existing target

To override an existing target, just give it the same name as the default target provided by BLT. E.g.,

  <project name="custom" default="build">
    <patternset id="files.frontend">
      <include name="**/*.js"/>
      <!-- Ignore custom bootstrap_sass directory. -->
      <exclude name="**/bootstrap_sass/**/*"/>
    </patternset>
  </project>

Overriding a variable value:

You can override the value of any Phing variable used by BLT by either:

  1. Adding the variable to your project.yml file:

     behat.tags: @mytags
    
  2. Specifying the variable value in your blt command using Phing argument syntax -D[key]=[value], e.g.,

     blt tests:behat -Dbehat.tags='@mytags'
    
  3. Using a custom build properties file rather than project.yml:

     blt tests:behat -propertyfile mycustomfile.yml -propertyfileoverride