@blockquote/create-wc 2.2.4 → 2.2.6
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 +40 -19
- package/src/common-repo/templates/eslint.config.js +13 -6
- package/src/common-repo/templates/package.json +10 -8
- package/src/common-repo/templates/prettierignore +0 -2
- package/src/common-repo/templates/static/vite.config.js +18 -11
- package/src/wc-lit-element-ts/templates/tsconfig.json +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote/create-wc",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"chalk": "^5.4.1",
|
|
54
54
|
"command-line-args": "^6.0.1",
|
|
55
55
|
"prompts": "^2.4.2",
|
|
56
|
-
"semver": "^7.
|
|
56
|
+
"semver": "^7.7.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@open-wc/eslint-config": "^12.0.3",
|
|
60
60
|
"eslint": "^8.57.1",
|
|
61
61
|
"eslint-config-prettier": "^10.0.1",
|
|
62
|
-
"prettier": "^3.
|
|
62
|
+
"prettier": "^3.5.2"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=14.15.0"
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
"scripts": {
|
|
3
3
|
"format": "npm run format:eslint && npm run format:prettier && npm run format:stylelint",
|
|
4
4
|
"format:eslint": "eslint . --fix",
|
|
5
|
-
"format:prettier": "prettier \"**/*.{js,ts,
|
|
6
|
-
"format:stylelint": "stylelint \"
|
|
7
|
-
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
|
|
8
|
-
"lint:eslint": "eslint .",
|
|
9
|
-
"lint:prettier": "prettier \"**/*.{js,ts,json,html}\" --check --ignore-path .prettierignore",
|
|
10
|
-
"lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .prettierignore"
|
|
5
|
+
"format:prettier": "prettier \"**/*.{js,ts,css,scss,html,json}\" --write --ignore-path .prettierignore",
|
|
6
|
+
"format:stylelint": "stylelint \"{demo,src}/**/*.{js,ts,css,scss,html}\" --fix --ignore-path .prettierignore"
|
|
11
7
|
},
|
|
12
8
|
"lint-staged": {
|
|
13
9
|
"**/*.{js,ts,html}": [
|
|
14
|
-
"npm run format:
|
|
10
|
+
"npm run format:prettier",
|
|
11
|
+
"npm run format:eslint",
|
|
12
|
+
"npm run format:stylelint"
|
|
15
13
|
],
|
|
16
|
-
"**/*.
|
|
14
|
+
"**/*.json": [
|
|
17
15
|
"npm run format:prettier"
|
|
18
16
|
],
|
|
19
17
|
"**/*.{scss,css}": [
|
|
18
|
+
"npm run format:prettier",
|
|
20
19
|
"npm run format:stylelint"
|
|
21
20
|
]
|
|
22
21
|
},
|
|
@@ -31,34 +30,56 @@
|
|
|
31
30
|
"options": {
|
|
32
31
|
"singleQuote": false
|
|
33
32
|
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"files": "*.json",
|
|
36
|
+
"options": {
|
|
37
|
+
"parser": "json-stringify"
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
]
|
|
36
41
|
},
|
|
37
42
|
"stylelint": {
|
|
38
43
|
"extends": "stylelint-config-standard-scss",
|
|
44
|
+
"allowEmptyInput": true,
|
|
39
45
|
"rules": {
|
|
40
46
|
"custom-property-pattern": null,
|
|
41
47
|
"no-duplicate-selectors": null,
|
|
42
48
|
"color-function-notation": null,
|
|
43
49
|
"alpha-value-notation": null
|
|
44
|
-
}
|
|
50
|
+
},
|
|
51
|
+
"overrides": [
|
|
52
|
+
{
|
|
53
|
+
"files": [
|
|
54
|
+
"**/*.html"
|
|
55
|
+
],
|
|
56
|
+
"customSyntax": "postcss-html"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"files": [
|
|
60
|
+
"**/*.{ts,js}"
|
|
61
|
+
],
|
|
62
|
+
"customSyntax": "postcss-lit"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
45
65
|
},
|
|
46
66
|
"devDependencies": {
|
|
47
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
48
|
-
"@html-eslint/parser": "^0.
|
|
49
|
-
"eslint": "^9.
|
|
67
|
+
"@html-eslint/eslint-plugin": "^0.35.0",
|
|
68
|
+
"@html-eslint/parser": "^0.35.0",
|
|
69
|
+
"eslint": "^9.21.0",
|
|
50
70
|
"eslint-config-prettier": "^10.0.1",
|
|
71
|
+
"eslint-plugin-html": "^8.1.2",
|
|
51
72
|
"eslint-plugin-import": "^2.31.0",
|
|
52
73
|
"eslint-plugin-lit": "^1.15.0",
|
|
53
74
|
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
54
|
-
"eslint-plugin-wc": "^2.2.
|
|
55
|
-
"@typescript-eslint/parser": "^8.
|
|
56
|
-
"typescript-eslint": "^8.
|
|
57
|
-
"globals": "^
|
|
75
|
+
"eslint-plugin-wc": "^2.2.1",
|
|
76
|
+
"@typescript-eslint/parser": "^8.24.1",
|
|
77
|
+
"typescript-eslint": "^8.24.1",
|
|
78
|
+
"globals": "^16.0.0",
|
|
58
79
|
"husky": "^9.1.7",
|
|
59
|
-
"lint-staged": "^15.4.
|
|
60
|
-
"prettier": "^3.
|
|
61
|
-
"stylelint": "^16.
|
|
80
|
+
"lint-staged": "^15.4.3",
|
|
81
|
+
"prettier": "^3.5.2",
|
|
82
|
+
"stylelint": "^16.14.1",
|
|
62
83
|
"stylelint-config-standard-scss": "^14.0.0"
|
|
63
84
|
}
|
|
64
85
|
}
|
|
@@ -7,8 +7,9 @@ import {configs as lit} from 'eslint-plugin-lit';
|
|
|
7
7
|
import * as importPlugin from 'eslint-plugin-import';
|
|
8
8
|
import tseslint from 'typescript-eslint';
|
|
9
9
|
import tsParser from '@typescript-eslint/parser';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import htmlEslint from '@html-eslint/eslint-plugin';
|
|
11
|
+
import htmlEslintParser from '@html-eslint/parser';
|
|
12
|
+
import eslintPluginHtml from 'eslint-plugin-html';
|
|
12
13
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
13
14
|
import globals from 'globals';
|
|
14
15
|
|
|
@@ -108,14 +109,14 @@ const tsFilesRules = {
|
|
|
108
109
|
};
|
|
109
110
|
|
|
110
111
|
// @html-eslint/eslint-plugin
|
|
111
|
-
const htmlFilesConfig = [
|
|
112
|
+
const htmlFilesConfig = [htmlEslint.configs['flat/recommended']].map((conf) => ({
|
|
112
113
|
...conf,
|
|
113
114
|
files: ['**/*.html'],
|
|
114
115
|
plugins: {
|
|
115
|
-
'@html-eslint':
|
|
116
|
+
'@html-eslint': htmlEslint,
|
|
116
117
|
},
|
|
117
118
|
languageOptions: {
|
|
118
|
-
parser:
|
|
119
|
+
parser: htmlEslintParser,
|
|
119
120
|
},
|
|
120
121
|
}));
|
|
121
122
|
|
|
@@ -129,6 +130,12 @@ const htmlFilesRules = {
|
|
|
129
130
|
},
|
|
130
131
|
};
|
|
131
132
|
|
|
133
|
+
// @eslint-plugin-html
|
|
134
|
+
const eslintPluginHtmlConfig = {
|
|
135
|
+
files: ['**/*.html'],
|
|
136
|
+
plugins: {eslintPluginHtml},
|
|
137
|
+
};
|
|
138
|
+
|
|
132
139
|
// eslint-config
|
|
133
140
|
export default [
|
|
134
141
|
{
|
|
@@ -149,7 +156,6 @@ export default [
|
|
|
149
156
|
'**/*.config.*',
|
|
150
157
|
'**/*.d.ts',
|
|
151
158
|
'**/*.min.js',
|
|
152
|
-
'**/*-styles.*',
|
|
153
159
|
'**/*.workspace.*',
|
|
154
160
|
],
|
|
155
161
|
},
|
|
@@ -165,6 +171,7 @@ export default [
|
|
|
165
171
|
tsFilesRules,
|
|
166
172
|
...htmlFilesConfig,
|
|
167
173
|
htmlFilesRules,
|
|
174
|
+
eslintPluginHtmlConfig,
|
|
168
175
|
eslintConfigPrettier,
|
|
169
176
|
{
|
|
170
177
|
languageOptions: {
|
|
@@ -34,19 +34,21 @@
|
|
|
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",
|
|
37
|
-
"playwright": "^1.
|
|
37
|
+
"playwright": "^1.50.1",
|
|
38
|
+
"postcss-html": "1.8.0",
|
|
39
|
+
"postcss-lit": "^1.2.0",
|
|
38
40
|
"@types/mocha": "^10.0.10",
|
|
39
41
|
"rollup-plugin-copy": "^3.5.0",
|
|
40
42
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
41
|
-
"tinyglobby": "^0.2.
|
|
43
|
+
"tinyglobby": "^0.2.12",
|
|
42
44
|
"concurrently": "^9.1.2",
|
|
43
45
|
"sort-package-json": "^2.14.0",
|
|
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.
|
|
46
|
+
"@vitest/browser": "^3.0.6",
|
|
47
|
+
"@vitest/coverage-istanbul": "^3.0.6",
|
|
48
|
+
"@vitest/coverage-v8": "^3.0.6",
|
|
49
|
+
"@vitest/ui": "^3.0.6",
|
|
50
|
+
"vitest": "^3.0.6",
|
|
51
|
+
"vite": "^6.1.1"
|
|
50
52
|
},
|
|
51
53
|
"publishConfig": {
|
|
52
54
|
"access": "public"
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import {defineConfig} from 'vite';
|
|
2
|
+
import {globSync} from 'tinyglobby';
|
|
2
3
|
import copy from 'rollup-plugin-copy';
|
|
3
4
|
import totalBundlesize from '@blockquote/rollup-plugin-total-bundlesize';
|
|
4
5
|
import externalizeSourceDependencies from '@blockquote/rollup-plugin-externalize-source-dependencies';
|
|
5
6
|
|
|
7
|
+
const OUT_DIR = 'dev';
|
|
8
|
+
const ENTRIES_DIR = 'demo';
|
|
9
|
+
const ENTRIES_GLOB = [`${ENTRIES_DIR}/**/*.js`];
|
|
10
|
+
|
|
6
11
|
const copyConfig = {
|
|
7
12
|
targets: [
|
|
8
13
|
{
|
|
9
|
-
src:
|
|
10
|
-
dest:
|
|
14
|
+
src: [`${ENTRIES_DIR}/**/*.*`, `!${ENTRIES_GLOB}`],
|
|
15
|
+
dest: OUT_DIR,
|
|
11
16
|
},
|
|
12
17
|
],
|
|
13
18
|
hook: 'writeBundle',
|
|
14
19
|
};
|
|
15
20
|
|
|
16
|
-
const entriesDir = 'demo';
|
|
17
|
-
const entriesGlob = [`${entriesDir}/entry.js`];
|
|
18
|
-
|
|
19
21
|
// https://github.com/vitejs/vite/discussions/1736#discussioncomment-5126923
|
|
20
22
|
const entries = Object.fromEntries(
|
|
21
|
-
|
|
22
|
-
const [key] = file.match(new RegExp(`(?<=${
|
|
23
|
+
globSync(ENTRIES_GLOB).map((file) => {
|
|
24
|
+
const [key] = file.match(new RegExp(`(?<=${ENTRIES_DIR}\/).*`)) || [];
|
|
23
25
|
return [key?.replace(/\.[^.]*$/, ''), file];
|
|
24
26
|
})
|
|
25
27
|
);
|
|
@@ -38,7 +40,6 @@ export default defineConfig({
|
|
|
38
40
|
browser: {
|
|
39
41
|
enabled: true,
|
|
40
42
|
headless: false,
|
|
41
|
-
name: 'chromium',
|
|
42
43
|
provider: 'playwright',
|
|
43
44
|
screenshotFailures: false,
|
|
44
45
|
viewport: {width: 1920, height: 1080},
|
|
@@ -49,11 +50,17 @@ export default defineConfig({
|
|
|
49
50
|
devtools: true,
|
|
50
51
|
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu'],
|
|
51
52
|
},
|
|
53
|
+
context: {},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
browser: 'webkit',
|
|
57
|
+
launch: {},
|
|
58
|
+
context: {},
|
|
52
59
|
},
|
|
53
60
|
],
|
|
54
61
|
},
|
|
55
62
|
coverage: {
|
|
56
|
-
provider: '
|
|
63
|
+
provider: 'istanbul',
|
|
57
64
|
reportsDirectory: 'test/coverage/',
|
|
58
65
|
reporter: ['lcov', 'json', 'text-summary', 'html'],
|
|
59
66
|
enabled: true,
|
|
@@ -77,12 +84,12 @@ export default defineConfig({
|
|
|
77
84
|
},
|
|
78
85
|
build: {
|
|
79
86
|
target: ['chrome71'],
|
|
80
|
-
outDir:
|
|
87
|
+
outDir: OUT_DIR,
|
|
81
88
|
rollupOptions: {
|
|
82
89
|
preserveEntrySignatures: 'exports-only',
|
|
83
90
|
input: entries,
|
|
84
91
|
output: {
|
|
85
|
-
dir:
|
|
92
|
+
dir: OUT_DIR,
|
|
86
93
|
entryFileNames: '[name].js',
|
|
87
94
|
format: 'es',
|
|
88
95
|
},
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
"esModuleInterop": true,
|
|
9
9
|
"experimentalDecorators": true,
|
|
10
10
|
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"lib": [
|
|
11
|
+
"lib": [
|
|
12
|
+
"es2022",
|
|
13
|
+
"DOM",
|
|
14
|
+
"DOM.Iterable"
|
|
15
|
+
],
|
|
12
16
|
"module": "es2022",
|
|
13
17
|
"moduleResolution": "Bundler",
|
|
14
18
|
"noFallthroughCasesInSwitch": true,
|
|
@@ -26,9 +30,13 @@
|
|
|
26
30
|
"strict": true,
|
|
27
31
|
"stripInternal": true,
|
|
28
32
|
"target": "es2022",
|
|
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
|
}
|