https://github.com/rdmurphy/custom-element-template
An opinionated template for creating a custom element.
https://github.com/rdmurphy/custom-element-template
Last synced: about 1 year ago
JSON representation
An opinionated template for creating a custom element.
- Host: GitHub
- URL: https://github.com/rdmurphy/custom-element-template
- Owner: rdmurphy
- License: mit
- Created: 2022-07-17T06:34:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T06:25:49.000Z (over 3 years ago)
- Last Synced: 2025-03-26T13:38:19.495Z (about 1 year ago)
- Language: TypeScript
- Size: 104 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `` element
An opinionated template for creating a custom element.
## Installation
You can install `` with npm, Yarn or pnpm.
```js
npm install custom-element-element
# or
yarn add custom-element-element
# or
pnpm install custom-element-element
```
## Usage
Import the custom element in your JavaScript bundle:
```js
import 'custom-element-element';
```
Then use the custom element in your HTML:
```html
```
## Development
This project uses [Vite](https://vitejs.dev/), a build tool that "aims to provide a faster and leaner development experience for modern web projects." The tests are ran using the [Playwright Test](https://playwright.dev/) test runner, which makes it easy to test custom elements in multiple browsers.
To set up your development environment, run the following command to install dependencies:
```sh
npm install
```
Run the following command to view your changes live in the browser:
```sh
npm start
```
When you want to run the tests, run:
```sh
npm test
```
## License
MIT