This proposal aims to enhance the marten collectassets command with an optional --fingerprint flag to streamline cache-busting and deployment processes in simple applications.
Functionality
When the --fingerprint flag is set, the marten collectassets should add a unique fingerprint to the filename of each collected asset.
Also a manifest.json should be generated, which maps the original asset filenames to their fingerprinted counterparts.
Description
This proposal aims to enhance the marten collectassets command with an optional --fingerprint flag to streamline cache-busting and deployment processes in simple applications.
Functionality
When the --fingerprint flag is set, the marten collectassets should add a unique fingerprint to the filename of each collected asset. Also a manifest.json should be generated, which maps the original asset filenames to their fingerprinted counterparts.
Example manifest.json:
The generated manifest.json has to be set manually in your Marten configuration (e.g., in
config/settings/production.cr
):Motivation
--fingerprint
flag maintains flexibility for developers who prefer their own asset handling.