(no title)
_d3Xt3r_ | 2 years ago
Like you, I dislike much of the modern web frameworks and all the bloat and unnecessary complexities that come with it. I roughly tuned out of this stuff when JQuery became mainstream and everyone and everything started using it, and I couldn't be bothered to keep up any more, nor did I feel inclined to invest my time in such a bloated framework. I did come back to webdev every now and then for casual projects, but every time I did, the world moved from one fad framework to the other, which made me dislike this messy ecosystem even more.
In particular, one environment/toolset that I really disliked was Node.js. Every time I did anything with Node, it always turned into pulling down a gazillion dependencies, and eventually down the line, that led to stuff breaking because some random dependency of a dependency was no longer compatible a with newer version of node or something. It basically put me off modern webdev for good, to the extent that I web back to using plain ol' php for the backend, and since then I've been exploring using pure HTML5+CSS3 without any Javascript for the frontend, but I've been seeing limitations like not being able to do stuff like real-time form validation etc.
Which brings me to your example:
# install dependencies
npm install
May I enquire why you're using npm here? Exactly what dependences are you pulling down? I thought the whole point of Nue was to avoid bloat like Node.js and dependency hell? Isn't Nue supposed to be a self-contained library/ecosystem?Can I use Nue without touching any Node stuff at all?
tipiirai|2 years ago
Node uses a single dependency, htmlparser2 [1], in the package.json [2]. The HTML parser is used to traverse the HTML that is written on the Nue files. I quickly _thought_ of writing my own parser, but right now I'm having my eyes staring at Bun's native HTML parsing capabilities. Instead of Node, I'm using Bun to develop everything. I need less dependencies with it, because things like JS minification or .env file parsing are biult in.
Avoiding NPM dependencies is a high priority!
[1]: https://github.com/fb55/htmlparser2
[2]: https://github.com/nuejs/nuejs/blob/master/package.json#L12
[3]: https://github.com/oven-sh/bun/discussions/1522
naasking|2 years ago
tipiirai|2 years ago
[1]: https://bradfrost.com/blog/post/front-of-the-front-end-and-b...