From 66944e627fd4282de75890b5d90c72bdf207f257 Mon Sep 17 00:00:00 2001 From: Martin Ramm Date: Mon, 4 Dec 2023 21:46:00 +0100 Subject: [PATCH 1/3] Add documentation about `fingerprint external` --- src/views/docs/en/guides/frontend/static-assets.md | 14 +++++++++++--- .../docs/en/reference/project-manifest/static.md | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/views/docs/en/guides/frontend/static-assets.md b/src/views/docs/en/guides/frontend/static-assets.md index 99b08d38..82477aca 100644 --- a/src/views/docs/en/guides/frontend/static-assets.md +++ b/src/views/docs/en/guides/frontend/static-assets.md @@ -8,8 +8,8 @@ Architect projects support text and binary static assets such as images, styles, ## `@static` configuration -- `fingerprint` - **boolean** (defaults to false) - - Enable static asset file fingerprinting (and long-lived caching headers) +- `fingerprint` - **boolean** or **string** (defaults to false) + - Enable long-lived caching headers by static asset file fingerprinting - `folder` - **string** (defaults to `./public`) - Designate the local folder to upload static assets from. - `ignore` - **list** @@ -25,7 +25,7 @@ Architect projects support text and binary static assets such as images, styles, ### `fingerprint` -Fingerprinting adds a unique SHA to a file name based on the file content before uploading to S3. The file can then be cached effectively forever. Whenever the contents of the file changes so does the SHA invalidating the cache. +When set to `true`, fingerprinting adds a unique SHA to a file name based on the file content before uploading to S3. The file can then be cached effectively forever. Whenever the contents of the file changes so does the SHA invalidating the cache. ```arc @static @@ -34,6 +34,14 @@ fingerprint true The Node.js runtime helper, [`@architect/functions`, provides a `static`](../../reference/runtime-helpers/node.js#arc.static) method to help create a path for a given fingerprinted asset. See [below for an example](#fingerprinted-file-paths). + +By setting fingerprinting to `external`, the file name is not changed before uploading to S3. You should only do this if you can ensure that the file name changes when you change the file content. This setting is incompatible with the the Node.js runtime helper mentioned above. + +```arc +@static +fingerprint external +``` + ### `folder` Use a custom folder name or path for static assets. diff --git a/src/views/docs/en/reference/project-manifest/static.md b/src/views/docs/en/reference/project-manifest/static.md index 9f77286d..44521d67 100644 --- a/src/views/docs/en/reference/project-manifest/static.md +++ b/src/views/docs/en/reference/project-manifest/static.md @@ -15,7 +15,7 @@ All parameters are optional. - `compression` - **boolean** or **string** (defaults to false) - Enable static asset compression; `true` or `br` compresses with brotli, or `gzip` compresses with gzip - `fingerprint` - **boolean** (defaults to false) - - Enable static asset file fingerprinting (and long-lived caching headers) + - Enable long-lived caching headers by static asset file fingerprinting - `folder` - **string** (defaults to `./public`) - Designate the local folder to upload static assets from. - `ignore` - **list** From f8a9ab7aac15e18e994480b3fbd103a0c1bae1e1 Mon Sep 17 00:00:00 2001 From: Martin Ramm Date: Mon, 4 Dec 2023 22:15:40 +0100 Subject: [PATCH 2/3] Fix typo --- src/views/docs/en/guides/frontend/static-assets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/docs/en/guides/frontend/static-assets.md b/src/views/docs/en/guides/frontend/static-assets.md index 82477aca..9fe6d5b3 100644 --- a/src/views/docs/en/guides/frontend/static-assets.md +++ b/src/views/docs/en/guides/frontend/static-assets.md @@ -35,7 +35,7 @@ fingerprint true The Node.js runtime helper, [`@architect/functions`, provides a `static`](../../reference/runtime-helpers/node.js#arc.static) method to help create a path for a given fingerprinted asset. See [below for an example](#fingerprinted-file-paths). -By setting fingerprinting to `external`, the file name is not changed before uploading to S3. You should only do this if you can ensure that the file name changes when you change the file content. This setting is incompatible with the the Node.js runtime helper mentioned above. +By setting fingerprinting to `external`, the file name is not changed before uploading to S3. You should only do this if you can ensure that the file name changes when you change the file content. This setting is incompatible with the Node.js runtime helper mentioned above. ```arc @static From a4f0c1891e32e23c962bf80d3b1eb13bf56d048e Mon Sep 17 00:00:00 2001 From: Ryan Block Date: Wed, 6 Dec 2023 15:30:41 -0800 Subject: [PATCH 3/3] 3.12.9 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fb731166..4846537e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@architect/arc.codes", - "version": "3.12.8", + "version": "3.12.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@architect/arc.codes", - "version": "3.12.8", + "version": "3.12.9", "license": "Apache-2.0", "dependencies": { "@architect/asap": "^6.0.4", diff --git a/package.json b/package.json index cc46aa87..9c632ccc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@architect/arc.codes", - "version": "3.12.8", + "version": "3.12.9", "repository": { "type": "git", "url": "https://github.com/architect/arc.codes"