@blockquote/create-wc 1.109.0 → 1.110.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/package.json +3 -3
- package/src/common-linting/templates/package.json +10 -10
- package/src/common-repo/templates/eslint.config.js +15 -11
- package/src/common-repo/templates/package.json +6 -5
- package/src/{wc-lit-element-ts → common-repo}/templates/static/demo/index.html +3 -6
- package/src/common-repo/templates/static/vite.config.js +20 -8
- package/src/wc-lit-element/templates/static/demo/entry.js +2 -0
- package/src/wc-lit-element-ts/templates/static/demo/entry.js +2 -0
- package/src/wc-lit-element/templates/static/demo/index.html +0 -35
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote/create-wc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.110.0",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
6
|
+
"Lit",
|
|
7
7
|
"web-component",
|
|
8
8
|
"sass",
|
|
9
9
|
"scaffold",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@open-wc/eslint-config": "^12.0.3",
|
|
61
61
|
"eslint": "^8.57.1",
|
|
62
62
|
"eslint-config-prettier": "^9.1.0",
|
|
63
|
-
"prettier": "^3.4.
|
|
63
|
+
"prettier": "^3.4.2"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=14.15.0"
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
49
|
-
"@html-eslint/parser": "^0.
|
|
50
|
-
"eslint": "^9.
|
|
48
|
+
"@html-eslint/eslint-plugin": "^0.31.1",
|
|
49
|
+
"@html-eslint/parser": "^0.31.0",
|
|
50
|
+
"eslint": "^9.16.0",
|
|
51
51
|
"eslint-config-prettier": "^9.1.0",
|
|
52
52
|
"eslint-plugin-import": "^2.31.0",
|
|
53
53
|
"eslint-plugin-lit": "^1.15.0",
|
|
54
54
|
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
55
55
|
"eslint-plugin-wc": "^2.2.0",
|
|
56
|
-
"@typescript-eslint/parser": "^8.
|
|
57
|
-
"typescript-eslint": "^8.
|
|
58
|
-
"globals": "^15.
|
|
56
|
+
"@typescript-eslint/parser": "^8.18.0",
|
|
57
|
+
"typescript-eslint": "^8.18.0",
|
|
58
|
+
"globals": "^15.13.0",
|
|
59
59
|
"husky": "^9.1.7",
|
|
60
|
-
"lint-staged": "^15.2.
|
|
61
|
-
"prettier": "^3.4.
|
|
62
|
-
"stylelint": "^16.
|
|
63
|
-
"stylelint-config-standard-scss": "^
|
|
60
|
+
"lint-staged": "^15.2.11",
|
|
61
|
+
"prettier": "^3.4.2",
|
|
62
|
+
"stylelint": "^16.11.0",
|
|
63
|
+
"stylelint-config-standard-scss": "^14.0.0"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import path from 'node:path';
|
|
3
2
|
import {fileURLToPath} from 'node:url';
|
|
4
|
-
import
|
|
3
|
+
import js from '@eslint/js';
|
|
4
|
+
import {FlatCompat} from '@eslint/eslintrc';
|
|
5
5
|
import {configs as wc} from 'eslint-plugin-wc';
|
|
6
6
|
import {configs as lit} from 'eslint-plugin-lit';
|
|
7
|
+
import * as importPlugin from 'eslint-plugin-import';
|
|
7
8
|
import tseslint from 'typescript-eslint';
|
|
8
9
|
import tsParser from '@typescript-eslint/parser';
|
|
9
10
|
import html from '@html-eslint/eslint-plugin';
|
|
11
|
+
import htmlParser from '@html-eslint/parser';
|
|
10
12
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
11
|
-
import js from '@eslint/js';
|
|
12
|
-
import {FlatCompat} from '@eslint/eslintrc';
|
|
13
13
|
import globals from 'globals';
|
|
14
14
|
|
|
15
15
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -24,8 +24,8 @@ const compat = new FlatCompat({
|
|
|
24
24
|
|
|
25
25
|
// eslint-plugin-import
|
|
26
26
|
const importFilesConfig = [
|
|
27
|
-
importPlugin.flatConfigs
|
|
28
|
-
importPlugin.flatConfigs
|
|
27
|
+
importPlugin.flatConfigs?.recommended,
|
|
28
|
+
importPlugin.flatConfigs?.typescript,
|
|
29
29
|
].map((conf) => ({
|
|
30
30
|
...conf,
|
|
31
31
|
files: [`**/*.${fileTypes}`],
|
|
@@ -111,16 +111,21 @@ const tsFilesRules = {
|
|
|
111
111
|
const htmlFilesConfig = [html.configs['flat/recommended']].map((conf) => ({
|
|
112
112
|
...conf,
|
|
113
113
|
files: ['**/*.html'],
|
|
114
|
+
plugins: {
|
|
115
|
+
'@html-eslint': html,
|
|
116
|
+
},
|
|
117
|
+
languageOptions: {
|
|
118
|
+
parser: htmlParser,
|
|
119
|
+
},
|
|
114
120
|
}));
|
|
115
121
|
|
|
116
122
|
const htmlFilesRules = {
|
|
117
123
|
files: ['**/*.html'],
|
|
118
124
|
rules: {
|
|
119
|
-
'@html-eslint/require-closing-tags': 'off',
|
|
120
|
-
'@html-eslint/attrs-newline': 'off',
|
|
121
|
-
'@html-eslint/element-newline': 'off',
|
|
122
125
|
'@html-eslint/indent': ['error', 2],
|
|
126
|
+
'@html-eslint/require-closing-tags': 'off',
|
|
123
127
|
'@html-eslint/no-extra-spacing-attrs': 'off',
|
|
128
|
+
'@html-eslint/attrs-newline': 'off',
|
|
124
129
|
},
|
|
125
130
|
};
|
|
126
131
|
|
|
@@ -144,8 +149,7 @@ export default [
|
|
|
144
149
|
'**/*.config.*',
|
|
145
150
|
'**/*.d.ts',
|
|
146
151
|
'**/*.min.js',
|
|
147
|
-
'**/*-styles
|
|
148
|
-
'**/*-styles.ts',
|
|
152
|
+
'**/*-styles.*',
|
|
149
153
|
'**/*.workspace.*',
|
|
150
154
|
],
|
|
151
155
|
},
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"customElements": "custom-elements.json",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"scripts": {
|
|
15
|
-
"start": "concurrently -k -r \"npm:
|
|
15
|
+
"start": "concurrently -k -r \"npm:vite\" \"npm:sass:watch\"",
|
|
16
16
|
"vite": "vite",
|
|
17
17
|
"dev:vite": "vite build",
|
|
18
18
|
"preview:vite": "vite preview",
|
|
@@ -29,16 +29,17 @@
|
|
|
29
29
|
"@blockquote/coverage-table-reporter": "^1.2.0",
|
|
30
30
|
"@blockquote/rollup-plugin-externalize-source-dependencies": "^1.0.0",
|
|
31
31
|
"@blockquote/rollup-plugin-total-bundlesize": "^2.1.2",
|
|
32
|
-
"@blockquote/sass-style-template": "^4.0
|
|
33
|
-
"@custom-elements-manifest/analyzer": "^0.10.
|
|
32
|
+
"@blockquote/sass-style-template": "^4.1.0",
|
|
33
|
+
"@custom-elements-manifest/analyzer": "^0.10.4",
|
|
34
34
|
"@open-wc/testing": "^4.0.0",
|
|
35
35
|
"@types/mocha": "^10.0.10",
|
|
36
36
|
"@web/test-runner": "^0.19.0",
|
|
37
37
|
"@web/test-runner-playwright": "^0.11.0",
|
|
38
|
-
"@
|
|
38
|
+
"@rollup/plugin-multi-entry": "^6.0.1",
|
|
39
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
39
40
|
"concurrently": "^9.1.0",
|
|
40
41
|
"sort-package-json": "^2.12.0",
|
|
41
|
-
"vite": "^6.0.
|
|
42
|
+
"vite": "^6.0.3"
|
|
42
43
|
},
|
|
43
44
|
"publishConfig": {
|
|
44
45
|
"access": "public"
|
|
@@ -16,19 +16,16 @@
|
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
19
|
-
<div id="demo"></div>
|
|
20
|
-
|
|
21
19
|
<script type="module">
|
|
22
|
-
import {html, render} from '
|
|
23
|
-
import '../src/define/<%= tagName %>.ts';
|
|
20
|
+
import {html, render} from './entry.js';
|
|
24
21
|
|
|
25
22
|
const heading = 'World!';
|
|
26
23
|
render(
|
|
27
24
|
html`<<%= tagName %>
|
|
28
|
-
@counterchange="${(ev) => console.log('==>', ev.detail)}" .heading
|
|
25
|
+
@counterchange="${(ev) => console.log('==>', ev.detail)}" .heading="${heading}"
|
|
29
26
|
>some light-dom</<%= tagName %>
|
|
30
27
|
>`,
|
|
31
|
-
document.
|
|
28
|
+
document.body
|
|
32
29
|
);
|
|
33
30
|
</script>
|
|
34
31
|
</body>
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
/* eslint-disable implicit-arrow-linebreak */
|
|
2
1
|
import {defineConfig} from 'vite';
|
|
3
|
-
import
|
|
2
|
+
import copy from 'rollup-plugin-copy';
|
|
3
|
+
import multi from '@rollup/plugin-multi-entry';
|
|
4
4
|
import totalBundlesize from '@blockquote/rollup-plugin-total-bundlesize';
|
|
5
5
|
import externalizeSourceDependencies from '@blockquote/rollup-plugin-externalize-source-dependencies';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const copyConfig = {
|
|
8
|
+
targets: [
|
|
9
|
+
{
|
|
10
|
+
src: 'demo/*.html',
|
|
11
|
+
dest: 'dev/',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
hook: 'writeBundle',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const outDir = process.env.OUTDIR || '.';
|
|
11
18
|
|
|
12
19
|
export default defineConfig({
|
|
13
20
|
plugins: [
|
|
14
21
|
externalizeSourceDependencies(['/__web-dev-server__web-socket.js']),
|
|
15
|
-
|
|
22
|
+
copy(copyConfig),
|
|
23
|
+
multi({entryFileName: 'entry.js'}),
|
|
16
24
|
totalBundlesize(),
|
|
17
25
|
],
|
|
26
|
+
optimizeDeps: {
|
|
27
|
+
exclude: ['lit', 'lit-html'],
|
|
28
|
+
},
|
|
18
29
|
build: {
|
|
19
30
|
target: ['chrome71'],
|
|
20
31
|
outDir: 'dev',
|
|
21
32
|
rollupOptions: {
|
|
22
|
-
|
|
33
|
+
preserveEntrySignatures: 'exports-only',
|
|
34
|
+
input: ['demo/*.js'],
|
|
23
35
|
output: {
|
|
24
36
|
dir: 'dev/',
|
|
25
37
|
format: 'es',
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Demo - <%= tagName %></title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<link rel="icon" href="data:image/x-icon;base64,B" />
|
|
8
|
-
<meta name="description" content="<%= tagName %>" />
|
|
9
|
-
<style>
|
|
10
|
-
html,
|
|
11
|
-
body {
|
|
12
|
-
height: 100%;
|
|
13
|
-
margin: 0;
|
|
14
|
-
font-family: sans-serif;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<div id="demo"></div>
|
|
20
|
-
|
|
21
|
-
<script type="module">
|
|
22
|
-
import {html, render} from 'lit';
|
|
23
|
-
import '../src/define/<%= tagName %>.js';
|
|
24
|
-
|
|
25
|
-
const heading = 'World!';
|
|
26
|
-
render(
|
|
27
|
-
html`<<%= tagName %>
|
|
28
|
-
@counterchange="${(ev) => console.log('==>', ev.detail)}" .heading=${heading}
|
|
29
|
-
>some light-dom</<%= tagName %>
|
|
30
|
-
>`,
|
|
31
|
-
document.querySelector('#demo')
|
|
32
|
-
);
|
|
33
|
-
</script>
|
|
34
|
-
</body>
|
|
35
|
-
</html>
|