1. Summary
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.
2. Rationale
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.
3. Scope & Implementation Plan
- 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.
- Cleanup: The temporary
buildSingleFile.mjs script was deleted from the repository.
- Rename Script: For improved clarity and consistency, the
build-es-modules npm script in package.json was renamed to build-dist-esm.
4. Definition of Done
- The
buildESModules.mjs script now uses the AST-based approach for all files.
- The temporary
buildSingleFile.mjs script has been removed.
- The corresponding npm script has been renamed to
build-dist-esm.
- The full build process runs successfully, correctly transforming all
html templates across the project.
1. Summary
This ticket covers the final integration of the robust, AST-based template processing into the main
build-es-modulesscript, and the subsequent cleanup of temporary development scripts.2. Rationale
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.3. Scope & Implementation Plan
minifyFilefunction frombuildSingleFile.mjs, containing the full AST parsing, transformation, and code generation logic, was moved intobuildESModules.mjs, replacing the older, less robust implementation.buildSingleFile.mjsscript was deleted from the repository.build-es-modulesnpm script inpackage.jsonwas renamed tobuild-dist-esm.4. Definition of Done
buildESModules.mjsscript now uses the AST-based approach for all files.buildSingleFile.mjsscript has been removed.build-dist-esm.htmltemplates across the project.