@diekeure/components
v0.0.21
Published
[![integrated monorepo](https://img.shields.io/static/v1?label=Nx%20setup&message=integrated%20monorepo&color=blue)](https://nx.dev/concepts/integrated-vs-package-based#integrated-repos)
Downloads
109
Readme
Lit with Nx
An example repository showcasing using Lit with Nx.
What's inside
The repository contains:
- A Lit Application (apps/webcomponents-previewer)
- An E2E Project (apps/webcomponents-previewer-e2e)
- A Workspace Library to house logic used by the application (libs/questions)
How to run it
Serve the application
To serve the application, run the command below and then in a browser navigate to http://localhost:4200/
In parallel runs a build script that parses .scss files to a .ts which contains a css literal tag.
This styles file should be imported in the static override styles
of your component.
npm run dev:webcomponents
import styles from './my-component.styles.ts';
export class MyComponent {
static override styles = [styles];
}
Build the application
To build the application, run the command below.
npx nx build webcomponents-previewer
Test the application
To run the unit tests, run the command below.
npx nx test webcomponents-previewer
Run E2E tests
To run the e2e tests, run the command below.
npx nx e2e webcomponents-previewer-e2e
Learn More
Use the resources below learn more about Lit and Nx.