mikser-io-layouts 2.4.0 → 2.4.1

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.
package/index.js CHANGED
@@ -110,9 +110,9 @@ export function layouts(userOptions = {}) {
110
110
  const { relativePath } = context
111
111
 
112
112
  // A .js file under the layouts folder is a SIDECAR (or something
113
- // a sidecar imports), never a layout. It used to have its `.js`
114
- // stripped and be created as an entity, which produced a phantom
115
- // `/layouts/page` — holding JS source as its content — beside the
113
+ // a sidecar imports), never a layout. Treating one as a layout —
114
+ // stripping its `.js` and creating an entity — yields a phantom
115
+ // `/layouts/page` holding JS source as its content, beside the
116
116
  // real `/layouts/page.liquid`.
117
117
  //
118
118
  // Sidecars are inputs to a layout's checksum instead (see
@@ -410,12 +410,12 @@ export function layouts(userOptions = {}) {
410
410
  if (!skipWrite) {
411
411
  const destinationFile = path.join(writeBase, entity.destination)
412
412
  // writeOutput skips the write when the bytes already on
413
- // disk are identical. Invalidation is deliberately
414
- // conservative — an entity that merely READ another
415
- // re-renders, because the engine cannot know which field
416
- // was read — so byte-identical output is routine, and
417
- // rewriting it moved mtime for live-reload, rsync and
418
- // `find -newer` alike. mkdir/unlink moved inside it.
413
+ // disk are identical, and owns the mkdir/unlink.
414
+ // Invalidation is deliberately conservative — an entity
415
+ // that merely READS another re-renders, since the engine
416
+ // cannot know which field was read — so byte-identical
417
+ // output is routine, and rewriting it moves mtime for
418
+ // live-reload, rsync and `find -newer` alike.
419
419
  const wrote = await writeOutput(destinationFile, output.result)
420
420
  if (wrote) {
421
421
  logger.debug('Layout render finished: %s', entity.destination.replace(runtime.options.workingFolder, ''))
package/lib/matching.js CHANGED
@@ -221,14 +221,14 @@ export function createOnProcessed({
221
221
  // pattern-match / auto-layout paths.
222
222
  // Persist the primary destination.
223
223
  //
224
- // entity.destination used to exist ONLY as a field the
225
- // render-task builder set per task, and was never written
226
- // back — so the catalog had none, and runtime.href()
227
- // (which needs the TARGET's destination to make a
228
- // relative URL) fell through and returned the whole
229
- // entity instead of { url }. The catalog is only written
224
+ // The primary destination has to be persisted, not just
225
+ // set per render task. runtime.href() needs the TARGET's
226
+ // destination to build a relative URL, and it reads the
227
+ // catalog: a destination that only ever exists on a
228
+ // task makes href() fall through and return the whole
229
+ // entity instead of { url }. The catalog is written only
230
230
  // through the journal, and this hook is where that
231
- // happens, so it has to be derived here.
231
+ // happens, so it is derived here.
232
232
  //
233
233
  // "Primary" means page 1 / the sole output of the FIRST
234
234
  // matched layout — the same choice entity.layout already
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mikser-io-layouts",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "SSG-flavor task-production policy for mikser-io. Multi-match layout assignment, per-layout destinations, postprocess chain attachment, layout inspection.",
5
5
  "main": "index.js",
6
6
  "type": "module",