Getting Started
Before getting started I will need to make some decisions up front.
To go vanilla or use a framework/library
I did some initial playing around and the first real decision I made was to use Lit. Part of me would like to write it completely from scratch however using Lit will save a fair amount of boilerplate. Other options included Stencil but it felt a bit too opinionated and had a build step.
Typescript
For me personally using Typescript is a must have, this will mean I have a “build” step despite saying I didn’t want one in the previous paragraph. The amount of bugs Typescript can flag and therefore save time down the line make it non-negotiable for me and as I’m used to writing Typescript I don’t feel the overhead is that much for the work it saves.
Spinning up a project
For starting a repo I used vite and as I use pnpm I created the new project using:
pnpm create vite I then selected the vanilla and typescript options, installed the node modules etc. Next I added Lit to the project with:
pnpm add lit