-
Notifications
You must be signed in to change notification settings - Fork 340
Description
I recently spent time evaluating the current landscape of Front-End developer tools and SSGs/Frameworks and I have come to the following conclusions...
Utility-first CSS is a major workflow paradigm shift
I've been playing with TailwindCSS (& purchased the TailwindUI tool kit). It turned out to be nothing what I expected.
-
Tailwind is a low level tool that can be used to implement any web interface. Tailwind is effectively an alternative to SASS/Less rather than an alternative to Bootstrap.
-
The Tailwind documentation is exceptional. The CSS/DSL is very good & the tooling is decent (for the most part). Tailwind has a strong team so I suspect the issues I have with the tools will eventually get worked out. Regardless, Tailwind is production viable right now and is likely to only get better moving forward.
For those who don't like the Tailwind approach, I'm not here to convince you otherwise. You should use the tools that best compliment your skillset choose the technology that has the downsides you are most willing to accept based on your values as a technologist.
ESBUILD and SWC are amazing - and they fit the Harp architecture perfectly
Those who are familiar with Harp know its a JIT in the true sense - in that the no compilation happens until a request is made to the Harp server (html/css/js). This is why Harp starts up so quickly and feels so fast. Harp can process Jade/EJS/Markdown/SASS/etc very quickly.
Unfortunately Harp never got a proper implementation of JavaScript bundling because the overhead was too high to build it with a JIT architecture - UNTIL NOW!. ESBUILD and SWC are now just as snappy to process as any of the other supported pre-processers in Harp - which in my view means resurrecting Harp is seriously worth considering. Perhaps I'm not alone.
The current state of Harp
I've been using Harp lately to play around with Tailwind and even though Harp is quite outdated it absolutely slays at building things with Tailwind. Templating truly is a strength of Harp and it shines in this case. For example, with zero-modification I can CMD-C a component from tailwindui.com and paste it directly into a file named _navbar.ejs then in my harp project then call partial("_navbar") from any other template. Later I can effortlessly add some variables to the EJS template <%= myvar %> or when It time to hand-bomb a component I simply use .jade to take advantage of the terse syntax. Then I use .md to add some content and style it by adding a content.sass file. Even without any updates to Harp its already a huge win - but I see so much potential in what this could become - and the question is would it be worth the work?
Harp's deficiencies.
To put it mildly, Harp is fairly outdated at this point which makes its flaws apparent compared to modern alternatives. However although the deficiencies are significant I think most would be nearly trivial to address. Harps architecture is solid and IMHO would not need to change at all. As I see it, these are the following deficiencies in Harp...
-
Proper JS Bundling - Harp need to handle JavaScript better and I think ESBUILD is the ticket to having a flawless implementation. Should certainly add
.cjs,.jsxsupport and if it comes without much additional effort it should also add.ts, and.tsxsupport. -
Shared Templates Client/Server - Harp could benefit with a template that can be called by both server Side by the SSG and Client Side using react .jsx seems like a natural fit for this use case and I think with this feature Harp would be a great tool for projects that are a SSG/SPA cross-over.
-
Embrace
package.json- It appears as though package.json is now the home base of every project. Harp should be designed and documented to be used in this way - especially if it has first-class bundling baked in as dependency management will be a requirement. -
New CLI - Harps CLI needs a refresh. This should be straight forward and easy to do.
harp .to start the server andharp . somebuilddirto compile the assets. Easy enough. -
Logging - Logging in harp is pretty much completely absent which is sad. Harp should provide useful logs for both when serving and compiling your site. Again, this should be an easy win.
-
Cut the Fat task complete! 🎉 - Everyone loves lightweight tools so Harp should leave what its not good at too other tools. (I have actually already started on this work - and last night cut down terraform from 53MB down to 7.7MB by removing pre-processors that are not very popular or and removing libraries that have negligible benefit.
Thats it for now. If you have thoughts on the past, present, or future of Harp I would love to hear what you have to say. Tell me, Is Harp worth resurrecting?