Coralite v0.40.1 Released

Coralite v0.40.1 is now available. This release focuses on improving build system reliability by introducing robust, centralized asset tracking APIs. These changes prevent accidental deletion of plugin-generated assets during build cleanups, automatically track local external style dependencies, and refine parser warning validations in unit tests.

Centralized Asset Tracking and Improved Cleanup #

To prevent build-time cleanups from purge-deleting custom or plugin-generated files, Coralite now implements a centralized asset tracking mechanism. A new app.writeFile(dest, content) core API manages file writes automatically, registering output paths to a centralized whitelist. In addition, developers can manually track files using core methods:

javascript
Code copied!
  // Track output files to prevent them from being purged during build cleanup
  app.trackOutputFile(absolutePath);
  
  // Retrieve all currently tracked files
  const trackedFiles = app.getTrackedOutputFiles();

The coralite-scripts build cleanup process has been updated to respect all absolute paths tracked through these new core APIs. Local externalStyles are also automatically tracked alongside source maps to guarantee their preservation. Internal plugins, including search and sitemap, have been refactored to use the new app.writeFile API directly.

Parser Warnings and Test Suite Enhancements #

Unit tests for parseHTML warnings now use more specific markup examples (such as <invalid--name>) to ensure warnings related to invalid custom element tag names match the parser's expected warning schemas precisely.

Additionally, a dedicated test suite has been introduced to cover asset tracking features, verifying manual tracking, automatic tracking of files written with writeFile, and local vs. remote external style tracking behavior.

How to Upgrade #

To upgrade to the latest version, update your project dependencies:

bash
Code copied!
  npm install coralite@0.40.1
bash
Code copied!
  npm install coralite-scripts@0.40.1

Related posts

More blog posts

Start Building with Coralite!

Use the scaffolding script to get jump started into your next project with Coralite

Copied commandline!