Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexw00/web-components-ts

A basic template for working with Web Components in Typescript.
https://github.com/alexw00/web-components-ts

typescript web-components web-starter

Last synced: 5 days ago
JSON representation

A basic template for working with Web Components in Typescript.

Awesome Lists containing this project

README

        

# Typescript Web Components starter template

This repo contains a basic template for working with Web Components in Typescript.

## Features

Web Components allow you to create custom HTML elements that can be used in your web pages. This starter template contains basic classes to work with them. The template is:

- ⚛ïļ Modular:
- write HTML, CSS, and TypeScript in separate files
- Models and ViewModels, keep the state separate from the DOM
- ðŸŠķ Minimal:
- no external dependencies, only Vite and vanilla TypeScript
- 💊 Powerful:
- pubSub pattern for event handling and communication

## Documentation:

-> see [📖 Documentation](docs/documentation.md)

## Setup

1. use the template to create your own repo
2. clone your repo
3. run `npm install`

### Development

1. run `npm run dev`
2. make changes to the code

### Build preview

1. run `npm run build`
2. run `npm run preview` and open the preview in a browser