@blockquote/create-wc 2.13.0 → 2.14.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 +1 -0
- package/package.json +11 -7
- package/src/common-linting/templates/package.json +7 -7
- package/src/common-repo/templates/eslint.config.js +0 -1
- package/src/common-repo/templates/package.json +19 -19
- package/src/common-repo/templates/static/vite.config.js +4 -5
- package/src/wc-lit-element/templates/tsconfig.json +8 -3
- package/src/wc-lit-element-ts/templates/tsconfig.json +11 -3
package/README.md
CHANGED
|
@@ -163,3 +163,4 @@ The repository itself is intentionally small: it assembles mixins and templates
|
|
|
163
163
|
|
|
164
164
|
- [rollup-plugin-total-bundlesize](https://github.com/oscarmarina/rollup-plugin-total-bundlesize)
|
|
165
165
|
- [vite-plugin-prevent-rewrite-imports-type-module](https://github.com/oscarmarina/vite-plugin-prevent-rewrite-imports-type-module/tree/main)
|
|
166
|
+
- [Create TypeScript Declarations from JavaScript JSDoc](https://humanwhocodes.com/snippets/2020/10/create-typescript-declarations-from-javascript-jsdoc/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote/create-wc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit",
|
|
@@ -30,18 +30,22 @@
|
|
|
30
30
|
"start": "node ./src/create.js"
|
|
31
31
|
},
|
|
32
32
|
"prettier": {
|
|
33
|
-
"bracketSameLine": true,
|
|
34
|
-
"htmlWhitespaceSensitivity": "ignore",
|
|
35
|
-
"singleQuote": true,
|
|
36
33
|
"bracketSpacing": false,
|
|
37
|
-
"trailingComma": "es5",
|
|
38
34
|
"printWidth": 100,
|
|
35
|
+
"singleQuote": true,
|
|
36
|
+
"trailingComma": "es5",
|
|
39
37
|
"overrides": [
|
|
40
38
|
{
|
|
41
39
|
"files": "*.{scss,css}",
|
|
42
40
|
"options": {
|
|
43
41
|
"singleQuote": false
|
|
44
42
|
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"files": "*.json",
|
|
46
|
+
"options": {
|
|
47
|
+
"parser": "json-stringify"
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
50
|
]
|
|
47
51
|
},
|
|
@@ -57,8 +61,8 @@
|
|
|
57
61
|
"@open-wc/eslint-config": "^13.1.0",
|
|
58
62
|
"eslint": "^10.6.0",
|
|
59
63
|
"eslint-config-prettier": "^10.1.8",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
64
|
+
"globals": "^17.7.0",
|
|
65
|
+
"prettier": "^3.9.4"
|
|
62
66
|
},
|
|
63
67
|
"publishConfig": {
|
|
64
68
|
"access": "public"
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"prettier": {
|
|
21
|
-
"singleQuote": true,
|
|
22
21
|
"bracketSpacing": false,
|
|
23
|
-
"trailingComma": "es5",
|
|
24
22
|
"printWidth": 100,
|
|
23
|
+
"singleQuote": true,
|
|
24
|
+
"trailingComma": "es5",
|
|
25
25
|
"overrides": [
|
|
26
26
|
{
|
|
27
27
|
"files": "*.{scss,css}",
|
|
@@ -73,18 +73,18 @@
|
|
|
73
73
|
"@html-eslint/parser": "^0.63.0",
|
|
74
74
|
"eslint": "^10.6.0",
|
|
75
75
|
"eslint-config-prettier": "^10.1.8",
|
|
76
|
-
"eslint-plugin-html": "^8.1.4",
|
|
77
|
-
"eslint-plugin-import-x": "^4.17.0",
|
|
78
76
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
77
|
+
"eslint-plugin-html": "^8.1.4",
|
|
78
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
79
79
|
"eslint-plugin-lit": "^2.3.1",
|
|
80
80
|
"eslint-plugin-lit-a11y": "^5.1.1",
|
|
81
81
|
"eslint-plugin-wc": "^3.1.0",
|
|
82
|
-
"typescript-eslint": "^8.62.0",
|
|
83
82
|
"globals": "^17.7.0",
|
|
84
83
|
"husky": "^9.1.7",
|
|
85
84
|
"lint-staged": "^17.0.8",
|
|
86
|
-
"prettier": "^3.9.
|
|
85
|
+
"prettier": "^3.9.4",
|
|
87
86
|
"stylelint": "^17.14.0",
|
|
88
|
-
"stylelint-config-standard-scss": "^17.0.0"
|
|
87
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
88
|
+
"typescript-eslint": "^8.63.0"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -9,7 +9,6 @@ import htmlEslintParser from '@html-eslint/parser';
|
|
|
9
9
|
import eslintPluginHtml from 'eslint-plugin-html';
|
|
10
10
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
11
11
|
import globals from 'globals';
|
|
12
|
-
import path from 'node:path';
|
|
13
12
|
|
|
14
13
|
const fileTypes = '{js,ts,mjs}';
|
|
15
14
|
|
|
@@ -7,20 +7,19 @@
|
|
|
7
7
|
"web-component",
|
|
8
8
|
"lit-element"
|
|
9
9
|
],
|
|
10
|
-
"author": "<%= tagName %>",
|
|
11
10
|
"license": "MIT",
|
|
12
|
-
"
|
|
11
|
+
"author": "<%= tagName %>",
|
|
13
12
|
"type": "module",
|
|
14
13
|
"scripts": {
|
|
15
|
-
"
|
|
16
|
-
"vite": "vite",
|
|
14
|
+
"analyze": "cem analyze --litelement --globs \"src/**/*.{js,ts}\" \"index.js\"",
|
|
17
15
|
"dev:vite": "vite build",
|
|
16
|
+
"prepare": "husky",
|
|
18
17
|
"preview:vite": "vite preview",
|
|
19
|
-
"analyze": "cem analyze --litelement --globs \"src/**/*.{js,ts}\" \"index.js\"",
|
|
20
18
|
"sort:package": "npx sort-package-json",
|
|
21
|
-
"
|
|
19
|
+
"start": "concurrently -k -r \"npm:vite\" \"npm:sass:watch\"",
|
|
22
20
|
"test": "vitest",
|
|
23
|
-
"test:watch": "vitest --browser.headless=false"
|
|
21
|
+
"test:watch": "vitest --browser.headless=false",
|
|
22
|
+
"vite": "vite"
|
|
24
23
|
},
|
|
25
24
|
"dependencies": {
|
|
26
25
|
"lit": "^3.3.3"
|
|
@@ -32,24 +31,25 @@
|
|
|
32
31
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
33
32
|
"@open-wc/semantic-dom-diff": "^0.20.1",
|
|
34
33
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
34
|
+
"@types/mocha": "^10.0.10",
|
|
35
|
+
"@vitest/browser-playwright": "^4.1.10",
|
|
36
|
+
"@vitest/coverage-istanbul": "^4.1.10",
|
|
37
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
38
|
+
"@vitest/ui": "^4.1.10",
|
|
39
|
+
"chai-a11y-axe": "^1.5.0",
|
|
40
|
+
"concurrently": "^10.0.3",
|
|
35
41
|
"playwright": "^1.61.1",
|
|
36
42
|
"postcss-html": "^1.8.1",
|
|
37
43
|
"postcss-lit": "^1.4.1",
|
|
38
|
-
"@types/mocha": "^10.0.10",
|
|
39
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
40
44
|
"rollup-plugin-node-externals": "^9.0.1",
|
|
41
|
-
"tinyglobby": "^0.2.17",
|
|
42
|
-
"chai-a11y-axe": "^1.5.0",
|
|
43
|
-
"concurrently": "^10.0.3",
|
|
44
45
|
"sort-package-json": "^4.0.0",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"vitest": "^4.1.9",
|
|
50
|
-
"vite": "^8.1.0"
|
|
46
|
+
"tinyglobby": "^0.2.17",
|
|
47
|
+
"vite": "^8.1.4",
|
|
48
|
+
"vite-plugin-static-copy": "^4.1.1",
|
|
49
|
+
"vitest": "^4.1.10"
|
|
51
50
|
},
|
|
52
51
|
"publishConfig": {
|
|
53
52
|
"access": "public"
|
|
54
|
-
}
|
|
53
|
+
},
|
|
54
|
+
"customElements": "custom-elements.json"
|
|
55
55
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {defineConfig} from 'vitest/config';
|
|
2
2
|
import {playwright} from '@vitest/browser-playwright';
|
|
3
3
|
import {globSync} from 'tinyglobby';
|
|
4
|
-
import
|
|
4
|
+
import {viteStaticCopy} from 'vite-plugin-static-copy';
|
|
5
5
|
import totalBundlesize from '@blockquote/rollup-plugin-total-bundlesize';
|
|
6
6
|
|
|
7
7
|
const OUT_DIR = 'dev';
|
|
@@ -13,10 +13,10 @@ const copyConfig = {
|
|
|
13
13
|
targets: [
|
|
14
14
|
{
|
|
15
15
|
src: [`${ENTRIES_DIR}/**/*.*`, `!${ENTRIES_GLOB}`],
|
|
16
|
-
dest:
|
|
16
|
+
dest: '.',
|
|
17
|
+
rename: {stripBase: 1},
|
|
17
18
|
},
|
|
18
19
|
],
|
|
19
|
-
hook: 'writeBundle',
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// https://github.com/vitejs/vite/discussions/1736#discussioncomment-5126923
|
|
@@ -44,7 +44,6 @@ const entries = (() => {
|
|
|
44
44
|
return Object.fromEntries(map);
|
|
45
45
|
})();
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
// https://vitejs.dev/config/
|
|
49
48
|
// https://vite-rollup-plugins.patak.dev/
|
|
50
49
|
// https://github.com/vitest-dev/vitest/commit/78b62ffe#diff-d3e264f3679867e205ed7eeb7622aa3b62bb0c4b1a4aa5a5983cb3aa118fcf3c
|
|
@@ -97,7 +96,7 @@ export default defineConfig(({command}) => ({
|
|
|
97
96
|
exclude: ['**/src/**/index.*', '**/src/styles/'],
|
|
98
97
|
},
|
|
99
98
|
},
|
|
100
|
-
plugins: [
|
|
99
|
+
plugins: command === 'build' ? [viteStaticCopy(copyConfig), totalBundlesize()] : [],
|
|
101
100
|
optimizeDeps: {
|
|
102
101
|
exclude: ['lit', 'lit-html'],
|
|
103
102
|
},
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
// https://humanwhocodes.com/snippets/2020/10/create-typescript-declarations-from-javascript-jsdoc/
|
|
4
3
|
"target": "es2021",
|
|
5
|
-
"lib": [
|
|
4
|
+
"lib": [
|
|
5
|
+
"es2021",
|
|
6
|
+
"DOM",
|
|
7
|
+
"DOM.Iterable"
|
|
8
|
+
],
|
|
6
9
|
"module": "es2020",
|
|
7
10
|
"moduleResolution": "node",
|
|
8
11
|
"allowJs": true,
|
|
@@ -15,5 +18,7 @@
|
|
|
15
18
|
"alwaysStrict": true,
|
|
16
19
|
"allowSyntheticDefaultImports": true
|
|
17
20
|
},
|
|
18
|
-
"include": [
|
|
21
|
+
"include": [
|
|
22
|
+
"src/**/*.js"
|
|
23
|
+
]
|
|
19
24
|
}
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
"esModuleInterop": true,
|
|
9
9
|
"experimentalDecorators": true,
|
|
10
10
|
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"lib": [
|
|
11
|
+
"lib": [
|
|
12
|
+
"es2023",
|
|
13
|
+
"DOM",
|
|
14
|
+
"DOM.Iterable"
|
|
15
|
+
],
|
|
12
16
|
"module": "esnext",
|
|
13
17
|
"moduleResolution": "Bundler",
|
|
14
18
|
"noFallthroughCasesInSwitch": true,
|
|
@@ -26,9 +30,13 @@
|
|
|
26
30
|
"strict": true,
|
|
27
31
|
"stripInternal": true,
|
|
28
32
|
"target": "es2023",
|
|
29
|
-
"types": [
|
|
33
|
+
"types": [
|
|
34
|
+
"mocha"
|
|
35
|
+
],
|
|
30
36
|
"useDefineForClassFields": false,
|
|
31
37
|
"verbatimModuleSyntax": true
|
|
32
38
|
},
|
|
33
|
-
"include": [
|
|
39
|
+
"include": [
|
|
40
|
+
"src/**/*.ts"
|
|
41
|
+
]
|
|
34
42
|
}
|