![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@jcayzac/astro-build-cache
Advanced tools
Persistent build cache for artifacts you generate during an SSG Astro build (social images, etc).
@jcayzac/astro-build-cache
This module provides a simple build cache for artifacts you may be generating during an Astro build.
As with Astro's own build artifacts, the cache is stored under node_modules/.astro
where it can be easily ignored by version control systems and cached by cloud providers.
$ ls -1 node_modules/.astro/
assets
build-cache.development # dev cache
build-cache.development-shm
build-cache.development-wal
build-cache.production # prod cache
build-cache.production-shm
build-cache.production-wal
bundle
chunks
content
data-store.json
To clear the cache, simply delete node_modules/.astro/build-cache.*
.
# pnpm
pnpm add @jcayzac/astro-build-cache
# bun
bunx add @jcayzac/astro-build-cache
# npm
npx add @jcayzac/astro-build-cache
# yarn
yarn add @jcayzac/astro-build-cache
# deno
deno add npm:@jcayzac/astro-build-cache
import { Cache } from '@jcayzac/astro-build-cache'
// Create a cache instance. Name is optional. Values are scoped by name.
const { cached } = new Cache('name')
// Now you can get values, with cache support, from anywhere.
const value = cached<Uint8Array>(
// keyable material
{
format: 'png',
options,
fonts,
element: serializeJsx(node),
},
// generator
async () =>
new Resvg(
(await satori(node, options)),
{
fitTo: {
mode: 'width',
value: options.width,
},
},
)
.render()
.asPng(),
)
[!TIP] To avoid any build error when using this module, you should add it to the list of externalized packages:
// astro.config.mjs export default defineConfig({ /* ...other options... */ vite: { build: { rollupOptions: { external: [ '@jcayzac/astro-build-cache', ], }, } }, })
If you like anything here, consider buying me a coffee using one of the following platforms:
FAQs
Persistent build cache for artifacts you generate during an SSG Astro build (social images, etc).
The npm package @jcayzac/astro-build-cache receives a total of 9 weekly downloads. As such, @jcayzac/astro-build-cache popularity was classified as not popular.
We found that @jcayzac/astro-build-cache demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.