Coralite v0.17.0
Coralite v0.17.0 introduces significant improvements to CSS handling, refactors core configuration logic, and enhances developer tooling. This release focuses on stability, clarity, and better support for modern web workflows—especially around styling and module resolution.
Key Improvements #
Developers now have full PostCSS integration with built-in support for plugins. The build system can process CSS and SCSS files through PostCSS, enabling advanced preprocessing without external tooling. This improves consistency across development and production builds.
Path handling across the project has been unified and corrected. The system now uses standard URL and file path resolution methods, reducing bugs related to incorrect file references—especially on Windows systems or in environments with symbolic links.
CLI behavior has been simplified. Instead of separate dev and build flags, the new mode argument provides a single, clear way to control runtime behavior. This makes configuration more predictable and easier to extend.
New Features #
- Added CSS support in the
create-coralitetemplate generator, allowing new projects to include styles out of the box. - Implemented PostCSS integration in
coralite-scripts, with plugin configuration via thecssPluginsoption in the config. - Added
stylesas a unified config field for both CSS and SCSS templates—replacing the oldercsskey for improved clarity. - Introduced a new
publish-createscript to streamline publishing thecreate-coralitepackage. - Updated the development server to include hot-reloading and SASS support, now centralized in
server.jsfor better maintainability.
Bug Fixes #
This release resolves long-standing path resolution issues that affected module linking, file saving, and HTML output. These fixes ensure consistent behavior across operating systems and file system layouts.
- Replaced regex-based path manipulation with
path.relative()andpath.normalize()for accurate path resolution. - Fixed incorrect module path resolution by using
fileURLToPathandpathToFileURLfor ES module compatibility. - Resolved incorrect file extension handling during collection of HTML files.
- Improved error handling during config loading, especially with asynchronous file system access.
- Corrected how slot components are generated—now only from valid HTML elements.
Documentation & Type Safety #
Documentation now includes clear guides for using Coralite components in JavaScript, with updated examples and structure. Type definitions have been expanded to reflect new options, especially around PostCSS and style configuration.
- Added
cssPluginstype definition for PostCSS configuration. - Updated README with new setup instructions, package structure, and reference links.
- Improved documentation links to point directly to
packages/coralitefor easier navigation. - Updated changelog formatting and PR links for consistency with previous releases.
Code Refactoring & Maintainability #
Internal code has been restructured for clarity and long-term maintainability. Key changes include:
- Renamed
cssconfig option tostylesto reflect broader support for CSS, SCSS, and PostCSS. - Moved the development server with hot-reloading and SASS support into
server.jsfor better separation of concerns. - Replaced
path.join()withpath.normalize()in template and page path resolution for cross-platform consistency. - Improved function exports and naming, including proper default exports for
buildSass. - Refactored
config-loaderto usehrefinstead oftoString()for accurate path resolution.
How to Upgrade #
To upgrade to Coralite v0.17.0, run:
npm install coralite@0.17.0
For full details, view the full changelog.
