HMPL.js Forem

Cover image for Major module update!
Anthony Max Subscriber for HMPL.js

Posted on

Major module update!

Hello everyone! In this short article, I'd like to talk about the new versions we recently released.

It would seem that the modules are quite utilitarian and there is no particular point in updating them, but nevertheless, it is worth keeping them up to date today, and we will talk about some of the changes in them today.

Stay informed!

⚙️ vite-plugin-hmpl and hmpl-loader

In case you weren't aware, .hmpl actually has its own file extension. Loading it requires loaders, which were created specifically for Vite and WebPack. For these, we've updated the settings validation, which relies on the following types:

interface HMPLCompileOptions {
  memo?: boolean;
  autoBody?: boolean | HMPLAutoBodyOptions;
  allowedContentTypes?: HMPLContentTypes;
  sanitize?: HMPLSanitize;
  disallowedTags?: HMPLDisallowedTags;
  sanitizeConfig?: Config;
}
Enter fullscreen mode Exit fullscreen mode

A small, but also quite interesting update.

🌳 hmpl-dom

This module is designed to use templating language syntax without npm or other add-ons. Nothing else is needed, just a single index.html file and that's it. In this update, we've added hmpl-dom.runtime.js.

runtime

This is also quite an update. They've also updated the README files and other texts everywhere, but that's not really important in the context of releases.

💬 Feedback

You can write your thoughts about the new features in the comments, it will be interesting to read! Or, there is a thematic Discord channel for questions and suggestions, there I or someone else will try to answer!

✅ This project is Open Source

So you can take part in it too! This also means you can use it for commercial purposes:

Repo: https://github.com/hmpl-language/hmpl (Star Us ★)
Website: https://hmpl-lang.dev
Full list of changes: https://hmpl-lang.dev/changelog

Thank you very much for reading the article!

thanks

Top comments (1)

Collapse
 
anthonymax profile image
Anthony Max HMPL.js

What do you think about the updates?