You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dave Olsen edited this page Jul 9, 2013
·
6 revisions
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.
How to Start the Watch
To set-up the watch on Mac OS X you can do the following:
Open scripts/
Double-click startAutoRegenerate.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. Type:
php builder/builder.php -w
How to Stop the Watch
To stop watching files on Mac OS X you can pressCTRL+C in the Terminal window where the process is running.
The Default Files That Are Watched
By default, the PHP version of Pattern Lab monitors the following files:
all of the patterns under source/patterns
source/data/data.json
source/data/listitems.json
source/css/styles.css
Adding Files to Be Watched
You can add additional files to be watched by editing config/config.ini. For example, you might want to track separate CSS files. In config/config.ini you will want to add the source files to wf and the location where the source files should be moved to to mf. Make sure to separate file names with a comma.
For example, let's say we wanted to watch a new CSS file, generated by Sass, that was at source/css/blueberry.css. When it was generated/saved we want the file moved to public/css/orange.css. To do this we'd modify our config/config.ini like so: