Ive done this before, I have used a bespoke micro framework to build a webpage. A couple of years later I wanted to update it, but discovered that I couldnt do it because of a bug in this framework and the framework also didnt exist anymore.
I could fix the bug myself by reading all their code, or I could start over and use something that would still exist next year.
Its written like the developer has a limited supply of lines of code. No comments, ton of declarations on the same line, and lines that run longer than most widescreen monitors.
Its all super compact and dense. I would not want to try to fix a bug here.
Suggestion: Add a build step that runs before your code is published to npm so that you can have readable source AND small source.
I've disassembled, decompiled and reverse engineered more code than that in a day. It's JavaScript. What comments do you need? There's a bit of noise in the first 100 lines, but it's not something you couldn't figure out in half an hour if need be.
The version you linked isn't the minified version.
Edit: and yes, I did see the code before I wrote my first comment. I wanted to make sure it was in fact relatively straightforward and not some 50k line monolith.
Thanks to both of you for the thoughtful discussion — I really appreciate seeing different perspectives here.
On the “lock-in” concern: that’s a fair point. dagger.js is still young, and it’s reasonable to be cautious with any new project. One of the core goals, though, is low lock-in: your code is still just HTML + JS + Web Components. Even if dagger.js disappeared tomorrow, your markup would continue to work with minimal adjustments.
On code readability: you’re right that the current source is compact and not heavily commented. That was a stylistic choice early on to keep things lightweight, but I understand it can make debugging less inviting. Based on this feedback, I’m planning to provide a more readable version so others can more easily step in.
So the trade-off you mentioned is valid: fewer features, but less surface area and minimal lock-in. The feedback here helps me refine where the ergonomics stop and where maintainability needs more attention.
Thanks again for taking the time to review both the idea and the code — it makes the project better, and I’ll keep iterating with these points in mind.
Haha, that’s a great way to put it . Writing one-line code does feel clever in the moment, but you’re right, the “writer’s joy” often turns into the “reader’s pain.” Striking the balance between elegance and readability is the real art of coding.
Also, have you read the dagger.js code? https://github.com/dagger8224/dagger.js/blob/main/src/dagger...
Its written like the developer has a limited supply of lines of code. No comments, ton of declarations on the same line, and lines that run longer than most widescreen monitors.
Its all super compact and dense. I would not want to try to fix a bug here.
Suggestion: Add a build step that runs before your code is published to npm so that you can have readable source AND small source.