Skip to content

Commit 35b61e5

Browse files
authored
Fix plop templates (#1007)
* update plop templates * fix plop template * don't break react
1 parent cc33805 commit 35b61e5

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

packages/webawesome/scripts/plop/plopfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function (plop) {
3737
},
3838
{
3939
type: 'add',
40-
path: '../../src/components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.styles.ts',
40+
path: '../../src/components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.css',
4141
templateFile: 'templates/component/styles.hbs',
4242
},
4343
{

packages/webawesome/scripts/plop/templates/component/component.hbs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { customElement, property } from 'lit/decorators.js';
21
import { html } from 'lit';
3-
import { LocalizeController } from '../../utilities/localize.js';
2+
import { customElement, property } from 'lit/decorators.js';
43
import { watch } from '../../internal/watch.js';
5-
import componentStyles from '../../styles/component.styles.js';
6-
import styles from './test-element.styles.js';
74
import WebAwesomeElement from '../../internal/webawesome-element.js';
8-
import type { CSSResultGroup } from 'lit';
5+
import componentStyles from '../../styles/component/host.css';
6+
import styles from './{{ tagWithoutPrefix tag }}.css';
97

108
/**
119
* @summary Short summary of the component's intended use.
@@ -15,8 +13,6 @@ import type { CSSResultGroup } from 'lit';
1513
*
1614
* @dependency wa-example
1715
*
18-
* @event wa-event-name - Emitted as an example.
19-
*
2016
* @slot - The default slot.
2117
* @slot example - An example slot.
2218
*
@@ -26,9 +22,7 @@ import type { CSSResultGroup } from 'lit';
2622
*/
2723
@customElement("{{ tag }}")
2824
export default class {{ properCase tag }} extends WebAwesomeElement {
29-
static styles: CSSResultGroup = [componentStyles, styles];
30-
31-
private readonly localize = new LocalizeController(this);
25+
static shadowStyle = [componentStyles, styles];
3226

3327
/** An example attribute. */
3428
@property() attr = 'example';
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import { css } from 'lit';
2-
3-
export default css`
4-
:host {
5-
display: block;
6-
}
7-
`;
1+
:host {
2+
display: block;
3+
}

packages/webawesome/scripts/plop/templates/component/tests.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import '../../../dist/webawesome.js';
21
import { expect, fixture, html } from '@open-wc/testing';
32

43
describe('<{{ tag }}>', () => {

0 commit comments

Comments
 (0)