Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit dca8bc9

Browse files
authored
Adding blt extension docs. (#272)
* Adding blt extension docs. * Removing docs from template.
1 parent b23f11d commit dca8bc9

27 files changed

+72
-36
lines changed

INSTALL.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ Note that all of the steps from this point forward are the same steps that would
107107

108108
Before building your project dependencies and installing Drupal, you must have a fully functional \*AMP stack on your local machine. BLT intentionally does not provide this local development environment--that is outside of the scope of BLT’s intended responsibilities. It does, however, make recommendations for which tools you should use to manage your stack.
109109

110-
Please see [Local Development](template/readme/local-development.md) for more information on setting up your \*AMP stack:
110+
Please see [Local Development](docs/local-development.md) for more information on setting up your \*AMP stack:
111111

112-
* [Acquia Dev Desktop](template/readme/local-development.md#using-acquia-dev-desktop-for-blt-generated-projects)
113-
* [Drupal VM](template/readme/local-development.md#using-drupal-vm-for-blt-generated-projects)
114-
* [Other](https://github.com/acquia/blt/blob/8.x/template/readme/local-development.md#alternative-local-development-environments)
112+
* [Acquia Dev Desktop](docs/local-development.md#using-acquia-dev-desktop-for-blt-generated-projects)
113+
* [Drupal VM](docs/local-development.md#using-drupal-vm-for-blt-generated-projects)
114+
* [Other](https://github.com/acquia/blt/blob/8.x/docs/local-development.md#alternative-local-development-environments)
115115

116116
When you have completed setting up your local \*AMP stack, double check that the following pieces of information are still correct:
117117

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ It scope is discretely defined. It is *not* intended to provide:
4343
* [Testing Framework](template/tests).
4444
* Behat: default `local.yml` configuration, example tests, `FeatureContext.php`
4545
* PHPUnit: default tests for ensuring proper functioning of BLT provided components
46-
* [Project tasks](template/readme/project-tasks.md)
46+
* [Project tasks](docs/project-tasks.md)
4747
* Executing tests and validating code
4848
* Building dependencies
4949
* (Re)installation of Drupal
5050
* Production-safe artifact generation and deployment
51-
* [Continuous Integration](template/readme/ci.md)
51+
* [Continuous Integration](docs/ci.md)
5252
* Travis CI
5353
* GitHub
5454

File renamed without changes.
File renamed without changes.

template/readme/best-practices.md docs/best-practices.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ See the [Drupal 8 Cache API](https://www.drupal.org/developing/api/8/cache) docu
8282

8383
## Patching
8484

85-
All modifications to contributed code should be performed via a patch. For detailed information on how to patch projects, please see [../patches/README.md]
86-
(../patches/README.md)
85+
All modifications to contributed code should be performed via a patch. For detailed information on how to patch projects, please see [../patches/README.md](../patches/README.md)
8786

8887
## Views
8988

template/readme/ci.md docs/ci.md

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/extending-blt.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Extending / Overriding BLT
2+
3+
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.
4+
5+
## Adding a custom target
6+
7+
<project name="custom" default="build">
8+
<!-- Add custom targets. -->
9+
</project>
10+
11+
## Overriding an existing target
12+
13+
To override an existing target, just give it the same name as the default target provided by BLT. E.g.,
14+
15+
<project name="custom" default="build">
16+
<patternset id="files.frontend">
17+
<include name="**/*.js"/>
18+
<!-- Ignore custom bootstrap_sass directory. -->
19+
<exclude name="**/bootstrap_sass/**/*"/>
20+
</patternset>
21+
</project>
22+
23+
## Overriding a variable value:
24+
25+
You can override the value of any Phing variable used by BLT by either:
26+
27+
1. Adding the variable to your project.yml file:
28+
29+
behat.tags: @mytags
30+
31+
2. Specifying the variable value in your `blt` command using [Phing](https://www.phing.info/docs/stable/hlhtml/index.html#d5e792) argument syntax `-D[key]=[value]`, e.g.,
32+
33+
blt tests:behat -Dbehat.tags='@mytags'
34+
35+
3. Using a custom build properties file rather than project.yml:
36+
37+
blt tests:behat -propertyfile mycustomfile.yml -propertyfileoverride
38+
39+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Acquia BLT (Build and Launch Tool)](https://github.com/acquia/blt) generates new Drupal projects using a standardized template derived from Acquia Professional Services' best practices.
22

33
Welcome to the BLT documentation site! Please read through the [Quick Start Guide](https://github.com/acquia/blt/INSTALL.md) to get started, and then browse the rest of this project's documentation in the sidebar.
4-
4+
55
# Contributing to BLT
6-
6+
77
Please feel free to edit any of the pages in this documentation via the 'Edit on GitHub' link at the top right. If you would like to help improve BLT, please file issues via the GitHub issue queue. See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines and instructions.

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ pages:
3737
- Release notes: 'scripts/release-notes/README.md'
3838
- Setting up continuous integration: 'template/readme/ci.md'
3939
- Open source contribution: 'template/readme/os-contribution.md'
40+
- Extending / Overriding BLT: 'template/readme/extending-blt.md'
4041
- Contributing: 'CONTRIBUTING.md'

phing/tasks/blt.xml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<!-- @todo Do not overwrite structured or executable files. Instead, update them intelligently. composer.json, project.yml, settings.php, drush.wrapper etc. -->
2323
<exec dir="${repo.root}" command="rsync -a --no-g --no-p --update ${blt.root}/template/ ${repo.root}/ --exclude 'project.yml' --exclude 'composer.json'" logoutput="true" checkreturn="true"/>
2424
<exec dir="${repo.root}" command="rsync -a --no-g --no-p --update ${blt.root}/template/project.yml ${repo.root}/ --ignore-existing" logoutput="true" checkreturn="true"/>
25+
<exec dir="${repo.root}" command="rsync -a --no-g --no-p --update ${blt.root}/template/README.md ${repo.root}/ --ignore-existing" logoutput="true" checkreturn="true"/>
2526
</target>
2627

2728
<target name="update" depends="init, blt:update-yml, configure">

scripts/blt/convert-to-composer.sh

+19-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
4848
echo "Removing deprecated BLT files from project."
4949
rm -rf build blt.sh tests/phpunit/blt
5050

51+
# Removing old docs.
52+
rm acsf-setup.md
53+
rm architecture.md
54+
rm best-practices.md
55+
rm deploy.md
56+
rm dev-workflow.md
57+
rm features-workflow.md
58+
rm local-development.md
59+
rm onboarding.md
60+
rm project-tasks.md
61+
rm release-process.md
62+
rm repo-architecture.md
63+
rm views.md
64+
5165
# Install (new) alias
5266
echo "Installing blt alias"
5367
yes | ./vendor/acquia/blt/blt.sh install-alias
@@ -59,7 +73,11 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
5973
echo ""
6074
echo "* Restart your terminal session to register your new blt alias."
6175
echo "* Review your codebase and commit the desired changes."
62-
echo "* Integrate your custom Phing files by adding their file paths to project.yml under the 'imports' key."
76+
echo "* If you have a custom Phing build file, you will likely need to update it and add it to project.yml under the 'import' key. See readme/extending-blt.md."
77+
echo "* If you are not using Lightning, remove lightning-specific target-hooks from project.yml."
78+
# .travis.yml
79+
# hash salt in settings.php
80+
# readme overrides
6381

6482
else
6583
exit 1

template/.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ install:
4646
- composer validate --no-check-all --ansi
4747
- composer install
4848
- export PATH=$TRAVIS_BUILD_DIR/vendor/bin:$PATH
49-
- drupal init --quiet
49+
# Initialize drupal console default configuration.
50+
- drupal init
5051
# Install proper version of node for front end tasks.
5152
- nvm install 4.4.1
5253
- nvm use 4.4.1
53-
# Initialize drupal console default configuration.
54-
- drupal init
5554

5655
before_script:
5756
# Clear drush release history cache, to pick up new releases.

template/README.md

-16
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22

33
Replace this with a brief description of the ${project.human_name} project.
44

5-
Documentation by role:
6-
7-
* Developer
8-
* [Onboarding](readme/onboarding.md): “how do I get up and running on project work?”
9-
* [Repository architecture](readme/repo-architecture.md): “how is the code organized, and why?”
10-
* [Running project tasks](readme/project-tasks.md): “how do I _____ on my local machine?”
11-
* [Best practices](readme/best-practices.md): "how should I write code?"
12-
* [Workflow](readme/dev-workflow.md): “how do I contribute my code to this project?”
13-
* [Automated testing](tests/README.md): “how do I write / run them, and why should I care?”
14-
* Technical Architect
15-
* [Project Architecture document](readme/architecture.md)
16-
* [Deploying to cloud](readme/deploy.md)
17-
* [Release process](readme/release-process.md)
18-
* [Setting up continuous integration](readme/ci.md)
19-
* [Open source contribution](readme/os-contribution.md)
20-
215
## Resources
226

237
* JIRA - link me!

template/scripts/git-hooks/pre-commit

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ if [ ! -f $PHPCS_BIN ];
1212
echo "Sniffing staged files via PHP Code Sniffer."
1313
fi
1414

15-
16-
${ROOT_DIR}blt.sh validate:phpcs:files -Dfiles="$LIST" -q
15+
${ROOT_DIR}/vendor/bin/blt validate:phpcs:files -Dfiles="$LIST" -q
1716
exit 0;

tests/phpunit/BltTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ public function testBltCreate() {
3939
'${project.machine_name}',
4040
file_get_contents($this->newProjectDir . '/docroot/sites/default/settings.php')
4141
);
42-
$this->assertNotContains(
43-
'${project.human_name}',
44-
file_get_contents($this->newProjectDir . '/readme/architecture.md')
45-
);
4642
}
4743

4844
}

0 commit comments

Comments
 (0)