Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit fa46aff

Browse files
committed
Document multiple methods of globbing files
1 parent fc1a7f2 commit fa46aff

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bin/templatemap_generator.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@
3030
need to edit the file after generation to ensure it contains valid
3131
PHP).
3232
33+
To provide a list of files, we recommend using one of the following.
34+
35+
For any shell, you can pipe the results of `find`:
36+
37+
$(find ../view -name '*.phtml')
38+
39+
For zsh, or bash where you have enabled globstar (`shopt -s globstar` in
40+
either your bash profile or from within your terminal):
41+
42+
../view/**/*.phtml
43+
3344
We recommend you then include the generated file within your module
3445
configuration:
3546
@@ -42,6 +53,11 @@
4253
# .phtml files; overwrite any existing files:
4354
$ cd module/Application/config/
4455
$ ../../../vendor/bin/templatemap_generator.php ../view ../view/**/*.phtml > template_map.config.php
56+
57+
# OR using find:
58+
$ ../../../vendor/bin/templatemap_generator.php \
59+
> ../view \
60+
> $(find ../view -name '*.phtml') > template_map.config.php
4561
EOH;
4662

4763
// Called without arguments

0 commit comments

Comments
 (0)