@normed/bundle 4.4.0 → 4.5.0

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/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ Given a version number MAJOR.MINOR.PATCH, increment the:
6
6
  2. MINOR version when you add functionality in a backwards compatible manner, and
7
7
  3. PATCH version when you make backwards compatible bug fixes.
8
8
 
9
+ # 4.5.0
10
+
11
+ * MINOR: Adds asset processing for pug entrypoints. Images, fonts, and other assets referenced in pug files are now hashed, copied to the output directory, and their paths rewritten automatically.
12
+ * MINOR: Adds automatic pug-to-pug entrypoint discovery. When a pug file links to another pug file (e.g., `a(href="about.pug")`), the linked file is automatically built as an entrypoint and the href is rewritten to point to the output path.
13
+
9
14
  # 4.4.0
10
15
 
11
16
  * MINOR: Adds `css.externalUrls` configuration option for marking URL patterns as external in CSS files.
package/README.md CHANGED
@@ -210,6 +210,36 @@ For CSS files that reference runtime paths (like `/fonts/*` or `/images/*`) that
210
210
 
211
211
  URL patterns support glob-style wildcards (`*`). URLs matching these patterns will be marked as external and left unchanged in the output CSS.
212
212
 
213
+ ### pug-to-pug linking
214
+
215
+ When a pug file contains links to other pug files, those linked files are automatically discovered and built as entrypoints. The href attributes are rewritten to point to the compiled HTML output.
216
+
217
+ ```pug
218
+ //- index.static.pug
219
+ html
220
+ body
221
+ nav
222
+ a(href="about.pug") About Us
223
+ a(href="pages/contact.pug") Contact
224
+ ```
225
+
226
+ This produces:
227
+ ```
228
+ src/ bundles/
229
+ ├─ index.static.pug → ├─ index.html (href rewritten to "about.html")
230
+ ├─ about.pug → ├─ about.html (auto-discovered)
231
+ ├─ pages/ ├─ pages/
232
+ └─ contact.pug → └─ contact.html (auto-discovered)
233
+ ```
234
+
235
+ Features:
236
+ - **Recursive**: If `about.pug` links to `team.pug`, that gets built too
237
+ - **Circular reference safe**: Files are only processed once
238
+ - **Asset handling**: Images and other assets in discovered pug files are processed normally
239
+ - **Warning on missing**: A warning is logged if a referenced pug file doesn't exist
240
+
241
+ This works for all HTML attributes that can contain paths (href, src, data, poster, etc.).
242
+
213
243
  ### analyse
214
244
 
215
245
  To get a report on bundle content and size enable analysis: