Fix plop templates (#1007)

* update plop templates

* fix plop template

* don't break react
This commit is contained in:
Cory LaViska
2025-06-02 09:37:30 -04:00
committed by GitHub
parent cc33805d27
commit 35b61e5cf3
4 changed files with 8 additions and 19 deletions

View File

@@ -37,7 +37,7 @@ export default function (plop) {
},
{
type: 'add',
path: '../../src/components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.styles.ts',
path: '../../src/components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.css',
templateFile: 'templates/component/styles.hbs',
},
{

View File

@@ -1,11 +1,9 @@
import { customElement, property } from 'lit/decorators.js';
import { html } from 'lit';
import { LocalizeController } from '../../utilities/localize.js';
import { customElement, property } from 'lit/decorators.js';
import { watch } from '../../internal/watch.js';
import componentStyles from '../../styles/component.styles.js';
import styles from './test-element.styles.js';
import WebAwesomeElement from '../../internal/webawesome-element.js';
import type { CSSResultGroup } from 'lit';
import componentStyles from '../../styles/component/host.css';
import styles from './{{ tagWithoutPrefix tag }}.css';
/**
* @summary Short summary of the component's intended use.
@@ -15,8 +13,6 @@ import type { CSSResultGroup } from 'lit';
*
* @dependency wa-example
*
* @event wa-event-name - Emitted as an example.
*
* @slot - The default slot.
* @slot example - An example slot.
*
@@ -26,9 +22,7 @@ import type { CSSResultGroup } from 'lit';
*/
@customElement("{{ tag }}")
export default class {{ properCase tag }} extends WebAwesomeElement {
static styles: CSSResultGroup = [componentStyles, styles];
private readonly localize = new LocalizeController(this);
static shadowStyle = [componentStyles, styles];
/** An example attribute. */
@property() attr = 'example';

View File

@@ -1,7 +1,3 @@
import { css } from 'lit';
export default css`
:host {
display: block;
}
`;
:host {
display: block;
}

View File

@@ -1,4 +1,3 @@
import '../../../dist/webawesome.js';
import { expect, fixture, html } from '@open-wc/testing';
describe('<{{ tag }}>', () => {