@blockquote/create-wc 1.29.0 → 1.40.0
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/README.md +13 -3
- package/package.json +4 -4
- package/src/common-linting/templates/package.json +6 -6
- package/src/common-repo/templates/package.json +8 -10
- package/src/common-repo/templates/static/custom-elements-manifest.config.js +5 -0
- package/src/common-repo/templates/static/vite.config.js +2 -34
- package/src/common-testing-wtr/templates/static/web-test-runner.config.mjs +1 -2
- package/src/linting-eslint-ts/templates/package.json +2 -2
- package/src/testing/templates/package.json +1 -1
- package/src/testing-ts/templates/package.json +1 -1
- package/src/wc-lit-element/templates/MyEl.js +9 -2
- package/src/wc-lit-element/templates/my-el.js +1 -1
- package/src/wc-lit-element/templates/static/README.md +6 -26
- package/src/wc-lit-element-ts/templates/MyEl.ts +9 -2
- package/src/wc-lit-element-ts/templates/my-el.ts +1 -1
- package/src/wc-lit-element-ts/templates/package.json +2 -2
- package/src/wc-lit-element-ts/templates/static/README.md +6 -26
package/README.md
CHANGED
|
@@ -111,8 +111,7 @@ export default ({
|
|
|
111
111
|
testFramework: {
|
|
112
112
|
config: {
|
|
113
113
|
ui: 'tdd',
|
|
114
|
-
timeout: 4000
|
|
115
|
-
reporter: 'html'
|
|
114
|
+
timeout: 4000
|
|
116
115
|
},
|
|
117
116
|
},
|
|
118
117
|
|
|
@@ -171,6 +170,17 @@ npm run sass:watch
|
|
|
171
170
|
<hr>
|
|
172
171
|
<br>
|
|
173
172
|
|
|
173
|
+
## Custom Element Manifest
|
|
174
|
+
|
|
175
|
+
### Generating README from custom-elements.json
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
npm run analyze
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
<hr>
|
|
182
|
+
<br>
|
|
183
|
+
|
|
174
184
|
## TypeScript
|
|
175
185
|
|
|
176
186
|
### build ts
|
|
@@ -190,7 +200,7 @@ npm run build
|
|
|
190
200
|
npm start
|
|
191
201
|
```
|
|
192
202
|
|
|
193
|
-
Example
|
|
203
|
+
**Example:**
|
|
194
204
|
|
|
195
205
|
### [open-wc-vitejs-sass](https://github.com/oscarmarina/open-wc-vitejs-sass)
|
|
196
206
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote/create-wc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"LitElement",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@open-wc/eslint-config": "^12.0.0",
|
|
50
|
-
"eslint": "^8.
|
|
51
|
-
"eslint-config-prettier": "^
|
|
52
|
-
"prettier": "^3.0.
|
|
50
|
+
"eslint": "^8.49.0",
|
|
51
|
+
"eslint-config-prettier": "^9.0.0",
|
|
52
|
+
"prettier": "^3.0.3"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=14.15.0"
|
|
@@ -89,13 +89,13 @@
|
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@open-wc/eslint-config": "^12.0.0",
|
|
92
|
-
"eslint": "^8.
|
|
93
|
-
"eslint-config-prettier": "^
|
|
92
|
+
"eslint": "^8.49.0",
|
|
93
|
+
"eslint-config-prettier": "^9.0.0",
|
|
94
94
|
"eslint-plugin-log-filenames": "^1.0.6",
|
|
95
95
|
"husky": "^8.0.3",
|
|
96
|
-
"lint-staged": "^
|
|
97
|
-
"prettier": "^3.0.
|
|
98
|
-
"stylelint": "^15.10.
|
|
99
|
-
"stylelint-config-standard-scss": "^
|
|
96
|
+
"lint-staged": "^14.0.1",
|
|
97
|
+
"prettier": "^3.0.3",
|
|
98
|
+
"stylelint": "^15.10.3",
|
|
99
|
+
"stylelint-config-standard-scss": "^11.0.0"
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -22,21 +22,19 @@
|
|
|
22
22
|
"prepare": "husky install"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"lit": "^2.
|
|
25
|
+
"lit": "^2.8.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@blockquote/
|
|
29
|
-
"@blockquote/sass-style-template": "^3.0.1",
|
|
28
|
+
"@blockquote/cem-to-markdown-readme": "^1.0.0",
|
|
30
29
|
"@blockquote/coverage-table-reporter": "^1.0.0",
|
|
30
|
+
"@blockquote/rollup-plugin-total-bundlesize": "^2.0.1",
|
|
31
|
+
"@blockquote/sass-style-template": "^3.0.2",
|
|
31
32
|
"@custom-elements-manifest/analyzer": "^0.8.4",
|
|
32
33
|
"@ungap/global-this": "^0.4.4",
|
|
33
|
-
"@web/rollup-plugin-html": "^2.0.
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"rollup-plugin-copy": "^3.4.0",
|
|
38
|
-
"tiny-array-flat-polyfill": "^0.2.1",
|
|
39
|
-
"vite": "^4.4.7",
|
|
34
|
+
"@web/rollup-plugin-html": "^2.0.1",
|
|
35
|
+
"concurrently": "^8.2.1",
|
|
36
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
37
|
+
"vite": "^4.4.9",
|
|
40
38
|
"sort-package-json": "^2.5.1"
|
|
41
39
|
},
|
|
42
40
|
"publishConfig": {
|
|
@@ -10,34 +10,6 @@ const copyConfig = {
|
|
|
10
10
|
src: 'node_modules/@ungap/global-this/index.js',
|
|
11
11
|
dest: 'dev/web_modules/@ungap/global-this',
|
|
12
12
|
},
|
|
13
|
-
{
|
|
14
|
-
src: 'node_modules/tiny-array-flat-polyfill/tiny-array-flat-polyfill.min.js',
|
|
15
|
-
dest: 'dev/web_modules/tiny-array-flat-polyfill',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
src: 'node_modules/lit/polyfill-support.js',
|
|
19
|
-
dest: 'dev/web_modules/lit',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
src: 'node_modules/lit/polyfill-support.js.map',
|
|
23
|
-
dest: 'dev/web_modules/lit',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
src: 'node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js',
|
|
27
|
-
dest: 'dev/web_modules/@webcomponents/webcomponentsjs',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
src: 'node_modules/@webcomponents/webcomponentsjs/bundles',
|
|
31
|
-
dest: 'dev/web_modules/@webcomponents/webcomponentsjs',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
src: 'node_modules/@webcomponents/shadycss/custom-style-interface.min.js',
|
|
35
|
-
dest: 'dev/web_modules/@webcomponents/shadycss',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
src: 'node_modules/@webcomponents/shadycss/custom-style-interface.min.js.map',
|
|
39
|
-
dest: 'dev/web_modules/@webcomponents/shadycss',
|
|
40
|
-
},
|
|
41
13
|
],
|
|
42
14
|
hook: 'writeBundle',
|
|
43
15
|
};
|
|
@@ -49,7 +21,7 @@ const copyConfig = {
|
|
|
49
21
|
|
|
50
22
|
export default defineConfig({
|
|
51
23
|
build: {
|
|
52
|
-
target: ['
|
|
24
|
+
target: ['chrome70'],
|
|
53
25
|
outDir: 'dev',
|
|
54
26
|
rollupOptions: {
|
|
55
27
|
input: 'demo/*.html',
|
|
@@ -64,11 +36,7 @@ export default defineConfig({
|
|
|
64
36
|
html.replace(
|
|
65
37
|
'<meta charset="utf-8">',
|
|
66
38
|
`<meta charset="utf-8">
|
|
67
|
-
<script src="./web_modules/@ungap/global-this/index.js"></script
|
|
68
|
-
<script src="./web_modules/tiny-array-flat-polyfill/tiny-array-flat-polyfill.min.js"></script>
|
|
69
|
-
<script src="./web_modules/lit/polyfill-support.js"></script>
|
|
70
|
-
<script src="./web_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
71
|
-
<script src="./web_modules/@webcomponents/shadycss/custom-style-interface.min.js"></script>`,
|
|
39
|
+
<script src="./web_modules/@ungap/global-this/index.js"></script>`,
|
|
72
40
|
),
|
|
73
41
|
],
|
|
74
42
|
}),
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { html, LitElement } from 'lit';
|
|
2
2
|
import { styles } from './styles/<%= tagName %>-styles.css.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 
|
|
6
|
+
*
|
|
7
|
+
* ## `<<%= tagName %>>`
|
|
8
|
+
* An example element.
|
|
9
|
+
*
|
|
10
|
+
* @fires counterchange - Indicates when the count changes
|
|
11
|
+
* @slot - This element has a slot
|
|
12
|
+
*/
|
|
4
13
|
export class <%= className %> extends LitElement {
|
|
5
|
-
static is = '<%= tagName %>';
|
|
6
|
-
|
|
7
14
|
static styles = [styles];
|
|
8
15
|
|
|
9
16
|
static properties = {
|
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
### \<<%= tagName %>>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
#### Usage
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
5
|
+
Install
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
npm i
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```html
|
|
16
|
-
<script type="module">
|
|
17
|
-
import '<%= tagName %>/<%= tagName %>.js';
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<<%= tagName %>></<%= tagName %>>
|
|
8
|
+
npm i
|
|
21
9
|
```
|
|
22
10
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
|
|
26
|
-
|
|
27
|
-
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
28
|
-
|
|
29
|
-
## Local Demo with `vite`
|
|
11
|
+
Generate `README.md` from a `custom-elements.json` file
|
|
30
12
|
|
|
31
13
|
```bash
|
|
32
|
-
npm
|
|
14
|
+
npm run analyze
|
|
33
15
|
```
|
|
34
|
-
|
|
35
|
-
To run a local development server that serves the basic demo located in demo/index.html
|
|
@@ -2,9 +2,16 @@ import { html, LitElement } from 'lit';
|
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import { styles } from './styles/<%= tagName %>-styles.css.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 
|
|
7
|
+
*
|
|
8
|
+
* ## `<<%= tagName %>>`
|
|
9
|
+
* An example element.
|
|
10
|
+
*
|
|
11
|
+
* @fires counterchange - Indicates when the count changes
|
|
12
|
+
* @slot - This element has a slot
|
|
13
|
+
*/
|
|
5
14
|
export class <%= className %> extends LitElement {
|
|
6
|
-
static is: string = '<%= tagName %>';
|
|
7
|
-
|
|
8
15
|
static override styles = [styles];
|
|
9
16
|
|
|
10
17
|
/**
|
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
### \<<%= tagName %>>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
#### Usage
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
5
|
+
Install
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
npm i
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```html
|
|
16
|
-
<script type="module">
|
|
17
|
-
import '<%= tagName %>/<%= tagName %>.js';
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<<%= tagName %>></<%= tagName %>>
|
|
8
|
+
npm i
|
|
21
9
|
```
|
|
22
10
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
|
|
26
|
-
|
|
27
|
-
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
28
|
-
|
|
29
|
-
## Local Demo with `vite`
|
|
11
|
+
Generate `README.md` from a `custom-elements.json` file
|
|
30
12
|
|
|
31
13
|
```bash
|
|
32
|
-
npm
|
|
14
|
+
npm run analyze
|
|
33
15
|
```
|
|
34
|
-
|
|
35
|
-
To run a local development server that serves the basic demo located in demo/index.html
|