Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ngneat/lit-file-generator

🎁 A lit generator for a component, directive, and controller.
https://github.com/ngneat/lit-file-generator

generator lit lit-html webcomponents

Last synced: 4 days ago
JSON representation

🎁 A lit generator for a component, directive, and controller.

Awesome Lists containing this project

README

        

# 🦄 Lit File Generator

A lit generator for a component, directive, and controller.


Install the library:

```
npm i @ngneat/lit-file-generator -g

litgen
```

Or via `npx`:

```
npx @ngneat/lit-file-generator litgen
npx @ngneat/lit-file-generator litgen component name
npx @ngneat/lit-file-generator litgen directive name
npx @ngneat/lit-file-generator litgen controller name
```

### Base Path:

By default, the directory prompt is set to the current directory.

To change it, add to the root `package.json` the following config:

```json
{
"lit": {
"basePath": "./src/app/"
}
}
```

The path should be relative to the `package.json`.

### Component Prefix:
The default component selector prefix is `app`. You can change it by setting the `prefix` option:

```json
{
"lit": {
"prefix": "lit"
}
}
```