@blockquote/create-wc 1.30.0 → 1.40.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 CHANGED
@@ -111,8 +111,7 @@ export default ({
111
111
  testFramework: {
112
112
  config: {
113
113
  ui: 'tdd',
114
- timeout: 4000,
115
- reporter: 'html'
114
+ timeout: 4000
116
115
  },
117
116
  },
118
117
 
@@ -171,6 +170,17 @@ npm run sass:watch
171
170
  <hr>
172
171
  <br>
173
172
 
173
+ ## Custom Element Manifest
174
+
175
+ ### Generating README from custom-elements.json
176
+
177
+ ```bash
178
+ npm run analyze
179
+ ```
180
+
181
+ <hr>
182
+ <br>
183
+
174
184
  ## TypeScript
175
185
 
176
186
  ### build ts
@@ -190,7 +200,7 @@ npm run build
190
200
  npm start
191
201
  ```
192
202
 
193
- Example:
203
+ **Example:**
194
204
 
195
205
  ### [open-wc-vitejs-sass](https://github.com/oscarmarina/open-wc-vitejs-sass)
196
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockquote/create-wc",
3
- "version": "1.30.0",
3
+ "version": "1.40.0",
4
4
  "description": "Web component with Lit scaffolding - Extending Open Web Component",
5
5
  "keywords": [
6
6
  "LitElement",
@@ -47,9 +47,9 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@open-wc/eslint-config": "^12.0.0",
50
- "eslint": "^8.47.0",
50
+ "eslint": "^8.49.0",
51
51
  "eslint-config-prettier": "^9.0.0",
52
- "prettier": "^3.0.2"
52
+ "prettier": "^3.0.3"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=14.15.0"
@@ -89,13 +89,13 @@
89
89
  },
90
90
  "devDependencies": {
91
91
  "@open-wc/eslint-config": "^12.0.0",
92
- "eslint": "^8.47.0",
92
+ "eslint": "^8.49.0",
93
93
  "eslint-config-prettier": "^9.0.0",
94
94
  "eslint-plugin-log-filenames": "^1.0.6",
95
95
  "husky": "^8.0.3",
96
96
  "lint-staged": "^14.0.1",
97
- "prettier": "^3.0.2",
97
+ "prettier": "^3.0.3",
98
98
  "stylelint": "^15.10.3",
99
- "stylelint-config-standard-scss": "^10.0.0"
99
+ "stylelint-config-standard-scss": "^11.0.0"
100
100
  }
101
101
  }
@@ -25,17 +25,15 @@
25
25
  "lit": "^2.8.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@blockquote/rollup-plugin-total-bundlesize": "^2.0.1",
29
- "@blockquote/sass-style-template": "^3.0.1",
28
+ "@blockquote/cem-to-markdown-readme": "^1.0.0",
30
29
  "@blockquote/coverage-table-reporter": "^1.0.0",
30
+ "@blockquote/rollup-plugin-total-bundlesize": "^2.0.1",
31
+ "@blockquote/sass-style-template": "^3.0.2",
31
32
  "@custom-elements-manifest/analyzer": "^0.8.4",
32
33
  "@ungap/global-this": "^0.4.4",
33
- "@web/rollup-plugin-html": "^2.0.0",
34
- "@webcomponents/shadycss": "^1.11.2",
35
- "@webcomponents/webcomponentsjs": "^2.8.0",
34
+ "@web/rollup-plugin-html": "^2.0.1",
36
35
  "concurrently": "^8.2.1",
37
- "rollup-plugin-copy": "^3.4.0",
38
- "tiny-array-flat-polyfill": "^0.2.1",
36
+ "rollup-plugin-copy": "^3.5.0",
39
37
  "vite": "^4.4.9",
40
38
  "sort-package-json": "^2.5.1"
41
39
  },
@@ -0,0 +1,5 @@
1
+ import { cemToMarkdownReadme } from '@blockquote/cem-to-markdown-readme';
2
+
3
+ export default {
4
+ plugins: [...cemToMarkdownReadme()],
5
+ };
@@ -10,34 +10,6 @@ const copyConfig = {
10
10
  src: 'node_modules/@ungap/global-this/index.js',
11
11
  dest: 'dev/web_modules/@ungap/global-this',
12
12
  },
13
- {
14
- src: 'node_modules/tiny-array-flat-polyfill/tiny-array-flat-polyfill.min.js',
15
- dest: 'dev/web_modules/tiny-array-flat-polyfill',
16
- },
17
- {
18
- src: 'node_modules/lit/polyfill-support.js',
19
- dest: 'dev/web_modules/lit',
20
- },
21
- {
22
- src: 'node_modules/lit/polyfill-support.js.map',
23
- dest: 'dev/web_modules/lit',
24
- },
25
- {
26
- src: 'node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js',
27
- dest: 'dev/web_modules/@webcomponents/webcomponentsjs',
28
- },
29
- {
30
- src: 'node_modules/@webcomponents/webcomponentsjs/bundles',
31
- dest: 'dev/web_modules/@webcomponents/webcomponentsjs',
32
- },
33
- {
34
- src: 'node_modules/@webcomponents/shadycss/custom-style-interface.min.js',
35
- dest: 'dev/web_modules/@webcomponents/shadycss',
36
- },
37
- {
38
- src: 'node_modules/@webcomponents/shadycss/custom-style-interface.min.js.map',
39
- dest: 'dev/web_modules/@webcomponents/shadycss',
40
- },
41
13
  ],
42
14
  hook: 'writeBundle',
43
15
  };
@@ -49,7 +21,7 @@ const copyConfig = {
49
21
 
50
22
  export default defineConfig({
51
23
  build: {
52
- target: ['edge18'],
24
+ target: ['chrome70'],
53
25
  outDir: 'dev',
54
26
  rollupOptions: {
55
27
  input: 'demo/*.html',
@@ -64,11 +36,7 @@ export default defineConfig({
64
36
  html.replace(
65
37
  '<meta charset="utf-8">',
66
38
  `<meta charset="utf-8">
67
- <script src="./web_modules/@ungap/global-this/index.js"></script>
68
- <script src="./web_modules/tiny-array-flat-polyfill/tiny-array-flat-polyfill.min.js"></script>
69
- <script src="./web_modules/lit/polyfill-support.js"></script>
70
- <script src="./web_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
71
- <script src="./web_modules/@webcomponents/shadycss/custom-style-interface.min.js"></script>`,
39
+ <script src="./web_modules/@ungap/global-this/index.js"></script>`,
72
40
  ),
73
41
  ],
74
42
  }),
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@typescript-eslint/eslint-plugin": "^6.4.1",
26
- "@typescript-eslint/parser": "^6.4.1"
25
+ "@typescript-eslint/eslint-plugin": "^6.7.0",
26
+ "@typescript-eslint/parser": "^6.7.0"
27
27
  }
28
28
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "devDependencies": {
3
3
  "@open-wc/testing": "^3.2.0",
4
- "@web/test-runner": "^0.17.0",
4
+ "@web/test-runner": "^0.17.1",
5
5
  "@web/test-runner-playwright": "^0.10.1"
6
6
  }
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "devDependencies": {
3
3
  "@open-wc/testing": "^3.2.0",
4
- "@web/test-runner": "^0.17.0",
4
+ "@web/test-runner": "^0.17.1",
5
5
  "@web/test-runner-playwright": "^0.10.1"
6
6
  }
7
7
  }
@@ -1,9 +1,16 @@
1
1
  import { html, LitElement } from 'lit';
2
2
  import { styles } from './styles/<%= tagName %>-styles.css.js';
3
3
 
4
+ /**
5
+ * ![Lit](https://img.shields.io/badge/lit-2.0.0-blue)
6
+ *
7
+ * ## `<<%= tagName %>>`
8
+ * An example element.
9
+ *
10
+ * @fires counterchange - Indicates when the count changes
11
+ * @slot - This element has a slot
12
+ */
4
13
  export class <%= className %> extends LitElement {
5
- static is = '<%= tagName %>';
6
-
7
14
  static styles = [styles];
8
15
 
9
16
  static properties = {
@@ -1,3 +1,3 @@
1
1
  import { <%= className %> } from '../src/<%= className %>.js';
2
2
 
3
- window.customElements.define(<%= className %>.is, <%= className %>);
3
+ window.customElements.define('<%= tagName %>', <%= className %>);
@@ -1,35 +1,15 @@
1
- # \<<%= tagName %>>
1
+ ### \<<%= tagName %>>
2
2
 
3
- ![Lit](https://img.shields.io/badge/lit-2.0.0-blue)
3
+ #### Usage
4
4
 
5
- This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
6
-
7
- ## Installation
5
+ Install
8
6
 
9
7
  ```bash
10
- npm i <%= tagName %>
11
- ```
12
-
13
- ## Usage
14
-
15
- ```html
16
- <script type="module">
17
- import '<%= tagName %>/<%= tagName %>.js';
18
- </script>
19
-
20
- <<%= tagName %>></<%= tagName %>>
8
+ npm i
21
9
  ```
22
10
 
23
- ## Tooling configs
24
-
25
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
26
-
27
- If you customize the configuration a lot, you can consider moving them to individual files.
28
-
29
- ## Local Demo with `vite`
11
+ Generate `README.md` from a `custom-elements.json` file
30
12
 
31
13
  ```bash
32
- npm start
14
+ npm run analyze
33
15
  ```
34
-
35
- To run a local development server that serves the basic demo located in demo/index.html
@@ -2,9 +2,16 @@ import { html, LitElement } from 'lit';
2
2
  import { property } from 'lit/decorators.js';
3
3
  import { styles } from './styles/<%= tagName %>-styles.css.js';
4
4
 
5
+ /**
6
+ * ![Lit](https://img.shields.io/badge/lit-2.0.0-blue)
7
+ *
8
+ * ## `<<%= tagName %>>`
9
+ * An example element.
10
+ *
11
+ * @fires counterchange - Indicates when the count changes
12
+ * @slot - This element has a slot
13
+ */
5
14
  export class <%= className %> extends LitElement {
6
- static is: string = '<%= tagName %>';
7
-
8
15
  static override styles = [styles];
9
16
 
10
17
  /**
@@ -1,3 +1,3 @@
1
1
  import { <%= className %> } from '../src/<%= className %>.js';
2
2
 
3
- window.customElements.define(<%= className %>.is, <%= className %>);
3
+ window.customElements.define('<%= tagName %>', <%= className %>);
@@ -1,35 +1,15 @@
1
- # \<<%= tagName %>>
1
+ ### \<<%= tagName %>>
2
2
 
3
- ![Lit](https://img.shields.io/badge/lit-2.0.0-blue)
3
+ #### Usage
4
4
 
5
- This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
6
-
7
- ## Installation
5
+ Install
8
6
 
9
7
  ```bash
10
- npm i <%= tagName %>
11
- ```
12
-
13
- ## Usage
14
-
15
- ```html
16
- <script type="module">
17
- import '<%= tagName %>/<%= tagName %>.js';
18
- </script>
19
-
20
- <<%= tagName %>></<%= tagName %>>
8
+ npm i
21
9
  ```
22
10
 
23
- ## Tooling configs
24
-
25
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
26
-
27
- If you customize the configuration a lot, you can consider moving them to individual files.
28
-
29
- ## Local Demo with `vite`
11
+ Generate `README.md` from a `custom-elements.json` file
30
12
 
31
13
  ```bash
32
- npm start
14
+ npm run analyze
33
15
  ```
34
-
35
- To run a local development server that serves the basic demo located in demo/index.html