I'd argue using web components helps you with your first and third point. If you want to find the code for the component X, you know what file to open.
For your second point about CSS, i think using SCSS would help too. You just add a compilation process before you deploy your website.
In any case, having a thousand line file is a code smell, and might be the cause of not separating the code in a modular way.
PS: You can checkout the npm module lit-html, if you want a thin layer on top your "DOM manipulation" 🙂
I actually got so frustrated that I didn't finish the project with the vanilla stuff😅. So the stack I went with was Pug for the Markup, I like how using indentation instead of the tags makes the markup smaller and more readable while also allowing me to separate the files. I went with SASS for the styling and I used parcel-bundler to separate the JS using ES6 modules.
I haven't quite dabbled with web components yet. Would you prefer those over a framework?
lit-htlm looks absoulutely lit🔥. I'll definitely play around with it. Thanks for the comment man😁
Great blog post👍.
I'd argue using web components helps you with your first and third point. If you want to find the code for the component X, you know what file to open.
For your second point about CSS, i think using SCSS would help too. You just add a compilation process before you deploy your website.
In any case, having a thousand line file is a code smell, and might be the cause of not separating the code in a modular way.
PS: You can checkout the npm module lit-html, if you want a thin layer on top your "DOM manipulation" 🙂
I actually got so frustrated that I didn't finish the project with the vanilla stuff😅. So the stack I went with was Pug for the Markup, I like how using indentation instead of the tags makes the markup smaller and more readable while also allowing me to separate the files. I went with SASS for the styling and I used parcel-bundler to separate the JS using ES6 modules.
I haven't quite dabbled with web components yet. Would you prefer those over a framework?
lit-htlm looks absoulutely lit🔥. I'll definitely play around with it. Thanks for the comment man😁
I'm still learning more about web components 😅, but as of now if I were to build a big project. I'd probably choose a library or framework.
I'd like to play more with web components in svelte, maybe polymer. Currently I'm just checking Salesforce Lightning Web Components 🙂