@blockquote/create-wc 2.2.1 → 2.2.3
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 +21 -3
- package/package.json +2 -3
- package/src/common-linting/templates/package.json +8 -9
- package/src/common-repo/templates/package.json +9 -9
- package/src/common-repo/templates/static/vite.config.js +6 -4
- package/src/wc-lit-element-ts/templates/package.json +1 -1
- package/src/wc-lit-element-ts/templates/vite.lib.config.js +4 -4
package/README.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This scaffold generator extends and customizes **[@open-wc/create](https://open-wc.org/docs/development/generator/#extending)**, providing a starting point for creating web components with **[Lit](https://lit.dev/)**.
|
|
4
4
|
|
|
5
|
+
**Example:**
|
|
6
|
+
|
|
7
|
+
[](https://github.com/oscarmarina/lit-vitest-testing-comparison)
|
|
8
|
+
|
|
9
|
+
[](https://stackblitz.com/github/oscarmarina/lit-vitest-testing-comparison)
|
|
10
|
+
|
|
11
|
+
<hr>
|
|
12
|
+
|
|
5
13
|
## Development Tools
|
|
6
14
|
|
|
7
15
|
### Scaffold
|
|
@@ -18,7 +26,7 @@ This scaffold generator extends and customizes **[@open-wc/create](https://open-
|
|
|
18
26
|
- TypeScript: [`vite` transpile only](https://vite.dev/guide/features.html#typescript)
|
|
19
27
|
- TypeScript: [`tsc` emit declarations only](https://www.typescriptlang.org/tsconfig/#emitDeclarationOnly)
|
|
20
28
|
|
|
21
|
-
- **Test**: [Vitest browser mode](https://vitest.dev/guide/browser/)
|
|
29
|
+
- **Test**: [Vitest browser mode](https://vitest.dev/guide/browser/) and [chai-a11y-axe](https://www.npmjs.com/package/chai-a11y-axe)
|
|
22
30
|
|
|
23
31
|
- ### Sass
|
|
24
32
|
|
|
@@ -63,9 +71,17 @@ npm run format
|
|
|
63
71
|
Run tests with:
|
|
64
72
|
|
|
65
73
|
```bash
|
|
74
|
+
// vitest --run --browser.headless
|
|
75
|
+
|
|
66
76
|
npm run test
|
|
67
77
|
```
|
|
68
78
|
|
|
79
|
+
```bash
|
|
80
|
+
// vitest
|
|
81
|
+
|
|
82
|
+
npm run test:watch
|
|
83
|
+
```
|
|
84
|
+
|
|
69
85
|
<hr>
|
|
70
86
|
|
|
71
87
|
### Development Server
|
|
@@ -136,6 +152,8 @@ to set up Husky and its Git hooks.
|
|
|
136
152
|
|
|
137
153
|
<hr>
|
|
138
154
|
|
|
139
|
-
**
|
|
155
|
+
**Plugins:**
|
|
156
|
+
|
|
157
|
+
- [rollup-plugin-externalize-source-dependencies](https://github.com/oscarmarina/rollup-plugin-externalize-source-dependencies)
|
|
140
158
|
|
|
141
|
-
- [
|
|
159
|
+
- [vite-plugin-prevent-rewrite-imports-type-module](https://github.com/oscarmarina/vite-plugin-prevent-rewrite-imports-type-module/tree/main)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote/create-wc",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
{
|
|
44
44
|
"files": "*.{scss,css}",
|
|
45
45
|
"options": {
|
|
46
|
-
"printWidth": 280,
|
|
47
46
|
"singleQuote": false
|
|
48
47
|
}
|
|
49
48
|
}
|
|
@@ -59,7 +58,7 @@
|
|
|
59
58
|
"devDependencies": {
|
|
60
59
|
"@open-wc/eslint-config": "^12.0.3",
|
|
61
60
|
"eslint": "^8.57.1",
|
|
62
|
-
"eslint-config-prettier": "^
|
|
61
|
+
"eslint-config-prettier": "^10.0.1",
|
|
63
62
|
"prettier": "^3.4.2"
|
|
64
63
|
},
|
|
65
64
|
"engines": {
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
{
|
|
30
30
|
"files": "*.{scss,css}",
|
|
31
31
|
"options": {
|
|
32
|
-
"printWidth": 280,
|
|
33
32
|
"singleQuote": false
|
|
34
33
|
}
|
|
35
34
|
}
|
|
@@ -45,21 +44,21 @@
|
|
|
45
44
|
}
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
49
|
-
"@html-eslint/parser": "^0.
|
|
50
|
-
"eslint": "^9.
|
|
51
|
-
"eslint-config-prettier": "^
|
|
47
|
+
"@html-eslint/eslint-plugin": "^0.32.0",
|
|
48
|
+
"@html-eslint/parser": "^0.32.0",
|
|
49
|
+
"eslint": "^9.18.0",
|
|
50
|
+
"eslint-config-prettier": "^10.0.1",
|
|
52
51
|
"eslint-plugin-import": "^2.31.0",
|
|
53
52
|
"eslint-plugin-lit": "^1.15.0",
|
|
54
53
|
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
55
54
|
"eslint-plugin-wc": "^2.2.0",
|
|
56
|
-
"@typescript-eslint/parser": "^8.
|
|
57
|
-
"typescript-eslint": "^8.
|
|
55
|
+
"@typescript-eslint/parser": "^8.20.0",
|
|
56
|
+
"typescript-eslint": "^8.20.0",
|
|
58
57
|
"globals": "^15.14.0",
|
|
59
58
|
"husky": "^9.1.7",
|
|
60
|
-
"lint-staged": "^15.
|
|
59
|
+
"lint-staged": "^15.4.1",
|
|
61
60
|
"prettier": "^3.4.2",
|
|
62
|
-
"stylelint": "^16.
|
|
61
|
+
"stylelint": "^16.13.2",
|
|
63
62
|
"stylelint-config-standard-scss": "^14.0.0"
|
|
64
63
|
}
|
|
65
64
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@blockquote/cem-to-markdown-readme": "^1.0.0",
|
|
31
31
|
"@blockquote/rollup-plugin-externalize-source-dependencies": "^1.0.0",
|
|
32
32
|
"@blockquote/rollup-plugin-total-bundlesize": "^2.2.0",
|
|
33
|
-
"@blockquote/sass-style-template": "^
|
|
33
|
+
"@blockquote/sass-style-template": "^5.0.0",
|
|
34
34
|
"@custom-elements-manifest/analyzer": "^0.10.4",
|
|
35
35
|
"@open-wc/semantic-dom-diff": "^0.20.1",
|
|
36
36
|
"@open-wc/testing": "^4.0.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"rollup-plugin-copy": "^3.5.0",
|
|
40
40
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
41
41
|
"tinyglobby": "^0.2.10",
|
|
42
|
-
"concurrently": "^9.1.
|
|
43
|
-
"sort-package-json": "^2.
|
|
44
|
-
"@vitest/browser": "^3.0.
|
|
45
|
-
"@vitest/coverage-istanbul": "^3.0.
|
|
46
|
-
"@vitest/coverage-v8": "^3.0.
|
|
47
|
-
"@vitest/ui": "^3.0.
|
|
48
|
-
"vitest": "^3.0.
|
|
49
|
-
"vite": "^6.0.
|
|
42
|
+
"concurrently": "^9.1.2",
|
|
43
|
+
"sort-package-json": "^2.14.0",
|
|
44
|
+
"@vitest/browser": "^3.0.2",
|
|
45
|
+
"@vitest/coverage-istanbul": "^3.0.2",
|
|
46
|
+
"@vitest/coverage-v8": "^3.0.2",
|
|
47
|
+
"@vitest/ui": "^3.0.2",
|
|
48
|
+
"vitest": "^3.0.2",
|
|
49
|
+
"vite": "^6.0.7"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
@@ -13,11 +13,13 @@ const copyConfig = {
|
|
|
13
13
|
hook: 'writeBundle',
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
const
|
|
16
|
+
const entriesDir = 'demo';
|
|
17
|
+
const entriesGlob = [`${entriesDir}/entry.js`];
|
|
18
|
+
|
|
19
|
+
// https://github.com/vitejs/vite/discussions/1736#discussioncomment-5126923
|
|
18
20
|
const entries = Object.fromEntries(
|
|
19
|
-
|
|
20
|
-
const [key] = file.match(new RegExp(`(?<=${
|
|
21
|
+
entriesGlob.map((file) => {
|
|
22
|
+
const [key] = file.match(new RegExp(`(?<=${entriesDir}\/).*`)) || [];
|
|
21
23
|
return [key?.replace(/\.[^.]*$/, ''), file];
|
|
22
24
|
})
|
|
23
25
|
);
|
|
@@ -2,13 +2,13 @@ import {defineConfig} from 'vite';
|
|
|
2
2
|
import {nodeExternals} from 'rollup-plugin-node-externals';
|
|
3
3
|
import {globSync} from 'tinyglobby';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const entriesDir = 'src';
|
|
6
|
+
const entriesGlob = `${entriesDir}/**/*.ts`;
|
|
7
7
|
|
|
8
8
|
// https://github.com/vitejs/vite/discussions/1736#discussioncomment-5126923
|
|
9
9
|
const entries = Object.fromEntries(
|
|
10
|
-
globSync(
|
|
11
|
-
const [key] = file.match(new RegExp(`(?<=${
|
|
10
|
+
globSync(entriesGlob).map((file) => {
|
|
11
|
+
const [key] = file.match(new RegExp(`(?<=${entriesDir}\/).*`)) || [];
|
|
12
12
|
return [key?.replace(/\.[^.]*$/, ''), file];
|
|
13
13
|
})
|
|
14
14
|
);
|