This is a template project that provides a basic project set-up for working with LitElement (using TypeScript) and webpack. I have created this project mainly for myself to save time getting a new project spun up but happy for anyone to use.
The structure is focussed on developing an application rather than a single web component but should be easy enough to adapt for single component development. Two simple components have been included just to prove it works.
Key libraries used are:
- LitElement 2.2.1
- TypeScript 3.5.3
- webpack 4.29.6
- @open-wc/demoing-storybook: 0.2.2
Up front, the project structure is not meant to be prescriptive but purely a starting point. Feel free to adapt and change as suits you.
Once you have cloned or copied the project run from the command line npm install
and then npm run dev
to verify that it is all working. If you have cloned the project run git remote rm origin
to remove the remote origin.
I have also included the open-wc implementation of Storybook to provide a design system. For more information on open-wc and Storybook see the links in references.
This template project was based on Marcus Hellberg's Creating a LitElement project.
- Updated to lit-element 2.2.1 and TypeScript 3.5.3