You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/epic-string-based-templates.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,3 +250,29 @@ Pre-processing templates at build time is a best practice in modern web developm
250
250
- The final minified output contains JSON VDOM, not template literals.
251
251
- The client-side `HtmlTemplateProcessor` is no longer required for production builds using this feature.
252
252
- The logic is cleanly separated, with no build-time code included in client-side bundles.
253
+
---
254
+
255
+
## 18. Sub-Ticket: Finalize and Integrate AST-based Build Process
256
+
257
+
**Status:** Done
258
+
259
+
### 1. Summary
260
+
261
+
This ticket covers the final integration of the robust, AST-based template processing into the main `build-es-modules` script, and the subsequent cleanup of temporary development scripts.
262
+
263
+
### 2. Rationale
264
+
265
+
After proving the AST-based approach in a dedicated script (`buildSingleFile.mjs`), it was necessary to merge this superior logic into the primary build script (`buildESModules.mjs`) that processes the entire project. This ensures that all files benefit from the robust template conversion. Consolidating the logic also simplifies the build toolchain.
266
+
267
+
### 3. Scope & Implementation Plan
268
+
269
+
1.**Integrate Logic:** The `minifyFile` function from `buildSingleFile.mjs`, containing the full AST parsing, transformation, and code generation logic, was moved into `buildESModules.mjs`, replacing the older, less robust implementation.
270
+
2.**Cleanup:** The temporary `buildSingleFile.mjs` script was deleted from the repository.
271
+
3.**Rename Script:** For improved clarity and consistency, the `build-es-modules` npm script in `package.json` was renamed to `build-dist-esm`.
272
+
273
+
### 4. Definition of Done
274
+
275
+
- The `buildESModules.mjs` script now uses the AST-based approach for all files.
276
+
- The temporary `buildSingleFile.mjs` script has been removed.
277
+
- The corresponding npm script has been renamed to `build-dist-esm`.
278
+
- The full build process runs successfully, correctly transforming all `html` templates across the project.
0 commit comments