Repository navigation
-
Introduce the log reporter and add colour to the output by default (or pass
--no-colourto disable). Pass--reporter logto the build) Supported reporters arelog(one line per visited route),null(only errors), andprogress(dots). #138 -
Add inter-build caching via support HTTP ETags. #138
Parklife now saves build metadata (in the file
BUILD_DIR/.parklife/build.yml) which is used to support HTTP caching via ETags (it can be skipped by setting the configskip_build_meta = falseor using--skip-build-metavia the CLI). ETag generation and the actual cache hit/miss responsibility rests on the app itself but hopefully your framework can help with this (certainly Rails has lots of HTTP caching helpers). Tell Parklife to use a previous build as a cache source at build time withparklife build --cache-dir build. -
Introduce response handlers and make it possible for them to be customised without having to resort to monkeypatching. #136
-
Only store a text/html response as an .html file #136
Prior to this change all responses were expected to be HTML unless the request path included a file extension which led to the following issue:
The path
/dry-types/v1.8would be detected as having a file extension (.8) and create the filedry-types/v1.8, then the path/dry-types/v1.8/something-elsewould attempt to create the filedry-types/v1.8/something-else.htmlbut encounter aErrno::EEXISTwhen it attempted to create the directorydry-types/v1.8.With this change a response is only saved as HTML when its content type is
text/html. This fixes the above case and should mean that files in the final build and how they're treated by a static server is better aligned with how they're used in the dynamic development environment. -
Fix including a 404 response in the build when
on_404was:skipor:warn. #135