stakx-io / stakx

An opinionated, powerful, and simple static website generator built in PHP
https://stakx.io/
MIT License
15 stars 3 forks source link

Fix Watch command inability to compile updated parent templates #46

Closed allejo closed 7 years ago

allejo commented 7 years ago

Summary

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Fixed issues #14

Description

Introduce a custom Twig loader that uses a cache key based on the file's last modification time when a website is being built during watch mode; this fixes parent templates not being recompiled during the watch command. Additionally, I've moved the project to a new file watcher, which has support for using external file watching tools in addition to polling the file system.

Lastly, I've added a --clean-cache option that will clear the .stakx-cache folder. The cache folder is automatically cleared when build is run but it no longer automatically be cleared when watch is run to help speed up build times.

Check List