@blockquote/create-wc 1.21.0 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/src/common-linting/templates/package.json +7 -8
- package/src/common-repo/index.js +3 -3
- package/src/common-repo/templates/package.json +4 -4
- package/src/linting-eslint-ts/templates/package.json +2 -2
- package/src/wc-lit-element/index.js +2 -2
- package/src/wc-lit-element/templates/MyEl.js +19 -25
- package/src/wc-lit-element/templates/package.json +2 -2
- package/src/wc-lit-element/templates/static/demo/index.html +1 -1
- package/src/wc-lit-element/templates/styles/{MyEl-styles.js → my-el-styles.css.js} +1 -1
- package/src/wc-lit-element-ts/index.js +2 -2
- package/src/wc-lit-element-ts/templates/MyEl.ts +3 -5
- package/src/wc-lit-element-ts/templates/package.json +4 -4
- package/src/wc-lit-element-ts/templates/static/demo/index.html +1 -1
- package/src/wc-lit-element-ts/templates/styles/{MyEl-styles.ts → my-el-styles.css.ts} +1 -1
- /package/src/common-repo/templates/styles/{MyEl.scss → my-el.scss} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote/create-wc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"LitElement",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"trailingComma": "all"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@open-wc/create": "^0.38.
|
|
43
|
-
"chalk": "^5.0
|
|
42
|
+
"@open-wc/create": "^0.38.66",
|
|
43
|
+
"chalk": "^5.2.0",
|
|
44
44
|
"command-line-args": "^5.2.1",
|
|
45
45
|
"prompts": "^2.4.2",
|
|
46
|
-
"semver": "^7.3.
|
|
46
|
+
"semver": "^7.3.8"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@open-wc/eslint-config": "^
|
|
50
|
-
"eslint": "^8.
|
|
51
|
-
"eslint-config-prettier": "^8.
|
|
52
|
-
"prettier": "^2.
|
|
49
|
+
"@open-wc/eslint-config": "^9.1.0",
|
|
50
|
+
"eslint": "^8.31.0",
|
|
51
|
+
"eslint-config-prettier": "^8.6.0",
|
|
52
|
+
"prettier": "^2.8.1"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=14.15.0"
|
|
@@ -86,21 +86,20 @@
|
|
|
86
86
|
"extends": "stylelint-config-standard-scss",
|
|
87
87
|
"rules": {
|
|
88
88
|
"custom-property-pattern": null,
|
|
89
|
-
"max-line-length": null,
|
|
90
89
|
"no-duplicate-selectors": null,
|
|
91
90
|
"color-function-notation": null,
|
|
92
91
|
"alpha-value-notation": null
|
|
93
92
|
}
|
|
94
93
|
},
|
|
95
94
|
"devDependencies": {
|
|
96
|
-
"@open-wc/eslint-config": "^9.
|
|
97
|
-
"eslint": "^8.
|
|
98
|
-
"eslint-config-prettier": "^8.
|
|
95
|
+
"@open-wc/eslint-config": "^9.2.2",
|
|
96
|
+
"eslint": "^8.34.0",
|
|
97
|
+
"eslint-config-prettier": "^8.6.0",
|
|
99
98
|
"eslint-plugin-log-filenames": "^1.0.6",
|
|
100
99
|
"husky": "^4.3.8",
|
|
101
|
-
"lint-staged": "^13.1.
|
|
102
|
-
"prettier": "^2.8.
|
|
103
|
-
"stylelint": "^
|
|
104
|
-
"stylelint-config-standard-scss": "^
|
|
100
|
+
"lint-staged": "^13.1.2",
|
|
101
|
+
"prettier": "^2.8.4",
|
|
102
|
+
"stylelint": "^15.2.0",
|
|
103
|
+
"stylelint-config-standard-scss": "^7.0.1"
|
|
105
104
|
}
|
|
106
105
|
}
|
package/src/common-repo/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export const CommonRepoMixin = (subclass) =>
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
await super.execute();
|
|
18
|
-
const {
|
|
18
|
+
const { tagName } = this.templateData;
|
|
19
19
|
|
|
20
20
|
this.copyTemplateJsonInto(
|
|
21
21
|
`${__dirname}/templates/package.json`,
|
|
@@ -24,8 +24,8 @@ export const CommonRepoMixin = (subclass) =>
|
|
|
24
24
|
|
|
25
25
|
// write & rename el scss template
|
|
26
26
|
this.copyTemplate(
|
|
27
|
-
`${__dirname}/templates/styles/
|
|
28
|
-
this.destinationPath(`src/styles/${
|
|
27
|
+
`${__dirname}/templates/styles/my-el.scss`,
|
|
28
|
+
this.destinationPath(`src/styles/${tagName}.scss`),
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
// write and rename .gitignore
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@blockquote/rollup-plugin-total-bundlesize": "^1.0.0",
|
|
28
|
-
"@blockquote/sass-style-template": "^
|
|
28
|
+
"@blockquote/sass-style-template": "^3.0.1",
|
|
29
29
|
"@blockquote/coverage-table-reporter": "^1.0.0",
|
|
30
|
-
"@custom-elements-manifest/analyzer": "^0.6.
|
|
30
|
+
"@custom-elements-manifest/analyzer": "^0.6.8",
|
|
31
31
|
"@ungap/global-this": "^0.4.4",
|
|
32
32
|
"@web/dev-server": "^0.1.35",
|
|
33
33
|
"@web/rollup-plugin-html": "^1.11.0",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"concurrently": "^7.6.0",
|
|
37
37
|
"rollup-plugin-copy": "^3.4.0",
|
|
38
38
|
"tiny-array-flat-polyfill": "^0.2.1",
|
|
39
|
-
"vite": "^4.
|
|
40
|
-
"sort-package-json": "^2.1
|
|
39
|
+
"vite": "^4.1.4",
|
|
40
|
+
"sort-package-json": "^2.4.1"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
@@ -40,8 +40,8 @@ export const WcLitElementMixin = (subclass) =>
|
|
|
40
40
|
|
|
41
41
|
// write & rename el styles template
|
|
42
42
|
this.copyTemplate(
|
|
43
|
-
`${__dirname}/templates/styles/
|
|
44
|
-
this.destinationPath(`src/styles/${
|
|
43
|
+
`${__dirname}/templates/styles/my-el-styles.css.js`,
|
|
44
|
+
this.destinationPath(`src/styles/${tagName}-styles.css.js`),
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
// write & rename el registration template
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import { html, LitElement } from 'lit';
|
|
2
|
-
import styles from './styles/<%=
|
|
2
|
+
import { styles } from './styles/<%= tagName %>-styles.css.js';
|
|
3
3
|
|
|
4
4
|
export class <%= className %> extends LitElement {
|
|
5
|
-
static
|
|
6
|
-
return '<%= tagName %>';
|
|
7
|
-
}
|
|
5
|
+
static is = '<%= tagName %>';
|
|
8
6
|
|
|
9
|
-
static
|
|
10
|
-
return [styles];
|
|
11
|
-
}
|
|
7
|
+
static styles = [styles];
|
|
12
8
|
|
|
13
|
-
static
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
}
|
|
9
|
+
static properties = {
|
|
10
|
+
/**
|
|
11
|
+
* The heading to say "Hello" to.
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
heading: { type: String },
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The number of times the button has been clicked.
|
|
18
|
+
* @type {number}
|
|
19
|
+
*/
|
|
20
|
+
counter: { type: Number },
|
|
21
|
+
};
|
|
28
22
|
|
|
29
23
|
constructor() {
|
|
30
24
|
super();
|
|
@@ -35,15 +29,15 @@ export class <%= className %> extends LitElement {
|
|
|
35
29
|
render() {
|
|
36
30
|
return html`
|
|
37
31
|
<h1>${this.sayHello(this.heading)}!</h1>
|
|
38
|
-
<button @click=${this
|
|
32
|
+
<button @click=${this.#onClick}>Counter: ${this.counter}</button>
|
|
39
33
|
<hr />
|
|
40
34
|
<slot></slot>
|
|
41
35
|
`;
|
|
42
36
|
}
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
#onClick() {
|
|
45
39
|
this.counter += 1;
|
|
46
|
-
this.dispatchEvent(new CustomEvent('
|
|
40
|
+
this.dispatchEvent(new CustomEvent('counterchange', { detail: this.counter }));
|
|
47
41
|
}
|
|
48
42
|
|
|
49
43
|
/**
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"./index.js": {
|
|
14
14
|
"default": "./index.js"
|
|
15
15
|
},
|
|
16
|
-
"./src/styles/<%=
|
|
17
|
-
"default": "./src/styles/<%=
|
|
16
|
+
"./src/styles/<%= tagName %>-styles.css.js": {
|
|
17
|
+
"default": "./src/styles/<%= tagName %>-styles.css.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
const heading = 'World!';
|
|
25
25
|
render(
|
|
26
26
|
html`<<%= tagName %>
|
|
27
|
-
@
|
|
27
|
+
@counterchange="${ev => console.log('==>', ev.detail)}" .heading=${heading}
|
|
28
28
|
>some light-dom</<%= tagName %>
|
|
29
29
|
>`,
|
|
30
30
|
document.querySelector('#demo'),
|
|
@@ -45,8 +45,8 @@ export const TsWcLitElementMixin = (subclass) =>
|
|
|
45
45
|
|
|
46
46
|
// write & rename el styles template
|
|
47
47
|
this.copyTemplate(
|
|
48
|
-
`${__dirname}/templates/styles/
|
|
49
|
-
this.destinationPath(`src/styles/${
|
|
48
|
+
`${__dirname}/templates/styles/my-el-styles.css.ts`,
|
|
49
|
+
this.destinationPath(`src/styles/${tagName}-styles.css.ts`),
|
|
50
50
|
);
|
|
51
51
|
|
|
52
52
|
// write & rename el registration template
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { html, LitElement } from 'lit';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
|
-
import styles from './styles/<%=
|
|
3
|
+
import { styles } from './styles/<%= tagName %>-styles.css.js';
|
|
4
4
|
|
|
5
5
|
export class <%= className %> extends LitElement {
|
|
6
|
-
static
|
|
7
|
-
return '<%= tagName %>';
|
|
8
|
-
}
|
|
6
|
+
static is: string = '<%= tagName %>';
|
|
9
7
|
|
|
10
8
|
static override styles = [styles];
|
|
11
9
|
|
|
@@ -32,7 +30,7 @@ export class <%= className %> extends LitElement {
|
|
|
32
30
|
|
|
33
31
|
#onClick() {
|
|
34
32
|
this.counter += 1;
|
|
35
|
-
this.dispatchEvent(new CustomEvent('
|
|
33
|
+
this.dispatchEvent(new CustomEvent('counterchange', { detail: this.counter }));
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
/**
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"./index.js": {
|
|
14
14
|
"default": "./dist/index.js"
|
|
15
15
|
},
|
|
16
|
-
"./src/styles/<%=
|
|
17
|
-
"default": "./dist/src/styles/<%=
|
|
16
|
+
"./src/styles/<%= tagName %>-styles.css.js": {
|
|
17
|
+
"default": "./dist/src/styles/<%= tagName %>-styles.css.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"wds": "web-dev-server"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"tslib": "^2.
|
|
36
|
-
"typescript": "^4.9.
|
|
35
|
+
"tslib": "^2.5.0",
|
|
36
|
+
"typescript": "^4.9.5"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
const heading = 'World!';
|
|
25
25
|
render(
|
|
26
26
|
html`<<%= tagName %>
|
|
27
|
-
@
|
|
27
|
+
@counterchange="${ev => console.log('==>', ev.detail)}" .heading=${heading}
|
|
28
28
|
>some light-dom</<%= tagName %>
|
|
29
29
|
>`,
|
|
30
30
|
document.querySelector('#demo'),
|
|
File without changes
|