Using CodeKit 3 with PatternLab 2
This is an updated version of how to work with CodeKit 3 and PatternLab 2.medium.com
I like how CodeKit processes SCSS files and how Pattern Lab keeps everything in order. But if I used CodeKit’s SCSS processors and Pattern Lab’s scripts for compiling and refreshing, I didn’t like multiple page refreshes and what sound my mac’s fans made. The problem was that both of the tools started processing code and refreshing the browser if something was saved on in the project folder. I looked around and found several hints how both of these tools could be used together, but still had running CodeKit and shell script in Terminal.
The way to keep everything in CodeKit is quite easy and depends on its Hooks.
The script for the hook has to point to your project’s builder.php in core folder and have a flag “-g” for generating site and cleaning up public folder.
php “/Users/eskolehtme/Documents/project/core/builder.php” -g
This is how my work with CodeKit and Pattern Lab is easier. I only have to open the project in CodeKit and start working.