bun-plugin-stx 0.2.223 → 0.2.224

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/serve.js +8 -0
  2. package/package.json +1 -1
package/dist/serve.js CHANGED
@@ -9108,6 +9108,14 @@ async function serve(options) {
9108
9108
  const fallbackLayoutsDir = options.fallbackLayoutsDir ?? stxConfig.fallbackLayoutsDir;
9109
9109
  const partialsDir = options.partialsDir ?? stxConfig.partialsDir ?? defaultStxConfig.partialsDir;
9110
9110
  const publicDir = options.publicDir ?? stxConfig.publicDir ?? "public";
9111
+ try {
9112
+ const { warmImagePlaceholders } = await import("@stacksjs/stx");
9113
+ const derived = await warmImagePlaceholders(nodePath.resolve(process19.cwd(), publicDir), {
9114
+ cachePath: stateDir(process19.cwd(), "image-placeholders.json")
9115
+ });
9116
+ if (derived > 0 && !production)
9117
+ console.log(`[stx] derived ${derived} image placeholder(s)`);
9118
+ } catch {}
9111
9119
  const stxModule = options.stxModule ? Promise.resolve(options.stxModule) : defaultStxModule;
9112
9120
  let resolvedStxModule = null;
9113
9121
  Promise.resolve(stxModule).then((m) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bun-plugin-stx",
3
3
  "type": "module",
4
- "version": "0.2.223",
4
+ "version": "0.2.224",
5
5
  "description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",