As you might have seen, I do a pause from #hsml right now
But this is just due to the awesome weather and I enjoy some other little things like starting a new journey in #nomanssky
Also at company work, it is right now totally frustrating and therefore I donβt need so much code right now outside of work π
Theoretically only some minor basic stuff is missing
1. doctype for the start of a file
2. comments behind attributes
Then everything basic is implemented and I can start working on other more advanced stuff like formatting and pretty compiled
Text blocks are now a thing in #hsml blobreachbounce
They can be used to write rich text *like longer lorem ipsum stuff* or **embedded** #css or #javascript!
The text will **not** escaped (#pugjs does this), so you can do stuff like:
```html
.alert.
<span class="closebtn">×</span>
<strong>Danger!</strong> Indicates a dangerous or potentially negative action.
```
This would result in valid #html (*by design*)
https://github.com/Shinigami92/hsml/commit/25a563687464994e9d0cd31c0b9ec604c176f46b
#html #pugjs #javascript #css #hsml
This is a first working example using #vscode with https://github.com/Shinigami92/vscode-hsml
I'm learning how **tmLanguage** is working
When using a #cli, what would you prefer?
1. Using `hsml compile .` explicitly and get a warning/error when not providing an input file/folder?
or
2. Using `hsml compile` without an input and it will use the current working directory as default/fallback?
Feel also free to comment why you prefer the one over the other π
@surma Ah okay, good to know π
In this case I think I will just add a compile flag later on if requested and fill fail by default on duplicate `id`/attribute.
Also I will merge class literals with normal classes.
@surma you told us some day that #html can contain multiple same attributes. But is this also possible for `id` or `class`?
I'm currently researching a bit (for #hsml) about this topic and some tools like JSFiddle fails with duplicate `id` not allowed (as same as for `class`).
I wrote down what I have in mind to plan the #cli for #hsml
https://github.com/Shinigami92/hsml/discussions/4
Please do not hesitate to communicate additions or suggested changes
#hsml now supports more complex arbitrary #tailwindcss values π₯³
https://www.youtube.com/watch?v=-nW2j_nVuNk&ab_channel=Shinigami
I'm thinking about how I could a good #cli for #hsml
I may orientate on existing CLIs like #Rust, #deno or #pnpm
so e.g.
```bash
hsml compile # compiles all .hsml files to .html inside current folder and recursive below
hsml compile ./example.hsml # just compiles the given file
hsml fmt # formats
hsml fmt # just formats given file
hsml parse ./example.hsml # parses the given file and std::out as json AST
```
But I'm not sure if this fulfills all need or if I need to change something
Today I started implementing standalone comments in #hsml
So, it is now possible to add native comments and developer comments
```
// this is a root dev comment
//! this is a root native comment (will get rendered)
div
// this is a child comment
p another tag
//! this is a child comment that gets rendered
```
Comments behind tags in the same line do not work yet, as do comments within attributes, but are definitely planned π
#hsml now has the ability to read a file from the command line and create an HTML file from it π₯³
At the current stage π§ of the project, I don't want to release the crate just yet, so you'll need to clone the repo if you want to try it
Then just run e.g. `cargo run -- example.hsml` and an `example.html` will be written (or panic π)
*The #cli arguments are subject to change at any time before an official release*
*It uses #clap under the hoo*d
#wip #html #Rust #clap #cli #hsml