@blockquote/create-wc 2.13.0 → 2.14.1

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 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.13.0",
3
+ "version": "2.14.1",
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
  },
@@ -55,10 +59,10 @@
55
59
  "devDependencies": {
56
60
  "@eslint/js": "^10.0.1",
57
61
  "@open-wc/eslint-config": "^13.1.0",
58
- "eslint": "^10.6.0",
62
+ "eslint": "^10.7.0",
59
63
  "eslint-config-prettier": "^10.1.8",
60
- "prettier": "^3.9.0",
61
- "globals": "^17.7.0"
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}",
@@ -69,22 +69,22 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "@eslint/js": "^10.0.1",
72
- "@html-eslint/eslint-plugin": "^0.63.0",
73
- "@html-eslint/parser": "^0.63.0",
74
- "eslint": "^10.6.0",
72
+ "@html-eslint/eslint-plugin": "^0.64.0",
73
+ "@html-eslint/parser": "^0.64.0",
74
+ "eslint": "^10.7.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.0",
85
+ "prettier": "^3.9.5",
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.64.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
- "customElements": "custom-elements.json",
11
+ "author": "<%= tagName %>",
13
12
  "type": "module",
14
13
  "scripts": {
15
- "start": "concurrently -k -r \"npm:vite\" \"npm:sass:watch\"",
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
- "prepare": "husky",
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"
@@ -30,26 +29,27 @@
30
29
  "@blockquote/rollup-plugin-total-bundlesize": "^2.4.0",
31
30
  "@blockquote/sass-style-template": "^5.1.1",
32
31
  "@custom-elements-manifest/analyzer": "^0.11.0",
33
- "@open-wc/semantic-dom-diff": "^0.20.1",
32
+ "@open-wc/semantic-dom-diff": "^0.21.0",
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
- "@vitest/browser-playwright": "^4.1.9",
46
- "@vitest/coverage-istanbul": "^4.1.9",
47
- "@vitest/coverage-v8": "^4.1.9",
48
- "@vitest/ui": "^4.1.9",
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 copy from 'rollup-plugin-copy';
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: OUT_DIR,
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: [copy(copyConfig), totalBundlesize()],
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": ["es2021", "DOM", "DOM.Iterable"],
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": ["src/**/*.js"]
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": ["es2023", "DOM", "DOM.Iterable"],
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": ["mocha"],
33
+ "types": [
34
+ "mocha"
35
+ ],
30
36
  "useDefineForClassFields": false,
31
37
  "verbatimModuleSyntax": true
32
38
  },
33
- "include": ["src/**/*.ts"]
39
+ "include": [
40
+ "src/**/*.ts"
41
+ ]
34
42
  }