-
Notifications
You must be signed in to change notification settings - Fork 448
Watching for Changes and Auto Regenerating Patterns
The PHP version of Pattern Lab has the ability to watch for changes to patterns and select files. When these files change, it will automatically rebuild the entire Pattern Lab website. You simply make your changes, save the file, and the PHP version of Pattern Lab will take care of the rest.
To set-up the watch on Mac OS X you can do the following:
- Open
scripts/
- Double-click
startWatcher.command
You can also start the watch from the command line. To do so open Terminal and navigate to the root of the patternlab-php
directory. You can use the same command via the Command Prompt on Windows. Type:
php builder/builder.php -w
To stop watching files on Mac OS X you can pressCTRL+C
in the Terminal window where the process is running.
By default, the PHP version of Pattern Lab monitors the following files:
- all of the patterns under
source/_patterns
- all of the JSON files under
source/_data/
- any directory in
source/
without an_
(underscore) or that doesn't match a directory name found in theid
variable inconfig/config.ini
- any file in
source/
with a file extension that doesn't match one found in theie
variable inconfig/config.ini
Instructions on how to ignore assets in other directories or with other file extensions can be found in "Managing Assets for a Pattern".