@blockquote/create-wc 1.21.0 → 1.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockquote/create-wc",
3
- "version": "1.21.0",
3
+ "version": "1.22.1",
4
4
  "description": "Web component with Lit scaffolding - Extending Open Web Component",
5
5
  "keywords": [
6
6
  "LitElement",
@@ -39,17 +39,17 @@
39
39
  "trailingComma": "all"
40
40
  },
41
41
  "dependencies": {
42
- "@open-wc/create": "^0.38.63",
43
- "chalk": "^5.0.1",
42
+ "@open-wc/create": "^0.38.66",
43
+ "chalk": "^5.2.0",
44
44
  "command-line-args": "^5.2.1",
45
45
  "prompts": "^2.4.2",
46
- "semver": "^7.3.7"
46
+ "semver": "^7.3.8"
47
47
  },
48
48
  "devDependencies": {
49
- "@open-wc/eslint-config": "^8.0.2",
50
- "eslint": "^8.23.0",
51
- "eslint-config-prettier": "^8.5.0",
52
- "prettier": "^2.7.1"
49
+ "@open-wc/eslint-config": "^9.1.0",
50
+ "eslint": "^8.31.0",
51
+ "eslint-config-prettier": "^8.6.0",
52
+ "prettier": "^2.8.1"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=14.15.0"
@@ -86,21 +86,20 @@
86
86
  "extends": "stylelint-config-standard-scss",
87
87
  "rules": {
88
88
  "custom-property-pattern": null,
89
- "max-line-length": null,
90
89
  "no-duplicate-selectors": null,
91
90
  "color-function-notation": null,
92
91
  "alpha-value-notation": null
93
92
  }
94
93
  },
95
94
  "devDependencies": {
96
- "@open-wc/eslint-config": "^9.0.0",
97
- "eslint": "^8.30.0",
98
- "eslint-config-prettier": "^8.5.0",
95
+ "@open-wc/eslint-config": "^9.2.2",
96
+ "eslint": "^8.34.0",
97
+ "eslint-config-prettier": "^8.6.0",
99
98
  "eslint-plugin-log-filenames": "^1.0.6",
100
99
  "husky": "^4.3.8",
101
- "lint-staged": "^13.1.0",
102
- "prettier": "^2.8.1",
103
- "stylelint": "^14.16.0",
104
- "stylelint-config-standard-scss": "^6.1.0"
100
+ "lint-staged": "^13.1.2",
101
+ "prettier": "^2.8.4",
102
+ "stylelint": "^15.2.0",
103
+ "stylelint-config-standard-scss": "^7.0.1"
105
104
  }
106
105
  }
@@ -15,7 +15,7 @@ export const CommonRepoMixin = (subclass) =>
15
15
  };
16
16
 
17
17
  await super.execute();
18
- const { className } = this.templateData;
18
+ const { tagName } = this.templateData;
19
19
 
20
20
  this.copyTemplateJsonInto(
21
21
  `${__dirname}/templates/package.json`,
@@ -24,8 +24,8 @@ export const CommonRepoMixin = (subclass) =>
24
24
 
25
25
  // write & rename el scss template
26
26
  this.copyTemplate(
27
- `${__dirname}/templates/styles/MyEl.scss`,
28
- this.destinationPath(`src/styles/${className}.scss`),
27
+ `${__dirname}/templates/styles/my-el.scss`,
28
+ this.destinationPath(`src/styles/${tagName}.scss`),
29
29
  );
30
30
 
31
31
  // write and rename .gitignore
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@blockquote/rollup-plugin-total-bundlesize": "^1.0.0",
28
- "@blockquote/sass-style-template": "^2.1.2",
28
+ "@blockquote/sass-style-template": "^3.0.1",
29
29
  "@blockquote/coverage-table-reporter": "^1.0.0",
30
- "@custom-elements-manifest/analyzer": "^0.6.6",
30
+ "@custom-elements-manifest/analyzer": "^0.6.8",
31
31
  "@ungap/global-this": "^0.4.4",
32
32
  "@web/dev-server": "^0.1.35",
33
33
  "@web/rollup-plugin-html": "^1.11.0",
@@ -36,8 +36,8 @@
36
36
  "concurrently": "^7.6.0",
37
37
  "rollup-plugin-copy": "^3.4.0",
38
38
  "tiny-array-flat-polyfill": "^0.2.1",
39
- "vite": "^4.0.2",
40
- "sort-package-json": "^2.1.0"
39
+ "vite": "^4.1.4",
40
+ "sort-package-json": "^2.4.1"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@typescript-eslint/eslint-plugin": "^5.47.0",
26
- "@typescript-eslint/parser": "^5.47.0"
25
+ "@typescript-eslint/eslint-plugin": "^5.53.0",
26
+ "@typescript-eslint/parser": "^5.53.0"
27
27
  }
28
28
  }
@@ -40,8 +40,8 @@ export const WcLitElementMixin = (subclass) =>
40
40
 
41
41
  // write & rename el styles template
42
42
  this.copyTemplate(
43
- `${__dirname}/templates/styles/MyEl-styles.js`,
44
- this.destinationPath(`src/styles/${className}-styles.js`),
43
+ `${__dirname}/templates/styles/my-el-styles.css.js`,
44
+ this.destinationPath(`src/styles/${tagName}-styles.css.js`),
45
45
  );
46
46
 
47
47
  // write & rename el registration template
@@ -1,30 +1,24 @@
1
1
  import { html, LitElement } from 'lit';
2
- import styles from './styles/<%= className %>-styles.js';
2
+ import { styles } from './styles/<%= tagName %>-styles.css.js';
3
3
 
4
4
  export class <%= className %> extends LitElement {
5
- static get is() {
6
- return '<%= tagName %>';
7
- }
5
+ static is = '<%= tagName %>';
8
6
 
9
- static get styles() {
10
- return [styles];
11
- }
7
+ static styles = [styles];
12
8
 
13
- static get properties() {
14
- return {
15
- /**
16
- * The heading to say "Hello" to.
17
- * @type {string}
18
- */
19
- heading: { type: String },
20
-
21
- /**
22
- * The number of times the button has been clicked.
23
- * @type {number}
24
- */
25
- counter: { type: Number },
26
- };
27
- }
9
+ static properties = {
10
+ /**
11
+ * The heading to say "Hello" to.
12
+ * @type {string}
13
+ */
14
+ heading: { type: String },
15
+
16
+ /**
17
+ * The number of times the button has been clicked.
18
+ * @type {number}
19
+ */
20
+ counter: { type: Number },
21
+ };
28
22
 
29
23
  constructor() {
30
24
  super();
@@ -35,15 +29,15 @@ export class <%= className %> extends LitElement {
35
29
  render() {
36
30
  return html`
37
31
  <h1>${this.sayHello(this.heading)}!</h1>
38
- <button @click=${this._onClick}>Counter: ${this.counter}</button>
32
+ <button @click=${this.#onClick}>Counter: ${this.counter}</button>
39
33
  <hr />
40
34
  <slot></slot>
41
35
  `;
42
36
  }
43
37
 
44
- _onClick() {
38
+ #onClick() {
45
39
  this.counter += 1;
46
- this.dispatchEvent(new CustomEvent('counter-changed', { detail: this.counter }));
40
+ this.dispatchEvent(new CustomEvent('counterchange', { detail: this.counter }));
47
41
  }
48
42
 
49
43
  /**
@@ -13,8 +13,8 @@
13
13
  "./index.js": {
14
14
  "default": "./index.js"
15
15
  },
16
- "./src/styles/<%= className %>-styles.js": {
17
- "default": "./src/styles/<%= className %>-styles.js"
16
+ "./src/styles/<%= tagName %>-styles.css.js": {
17
+ "default": "./src/styles/<%= tagName %>-styles.css.js"
18
18
  }
19
19
  },
20
20
  "main": "index.js",
@@ -24,7 +24,7 @@
24
24
  const heading = 'World!';
25
25
  render(
26
26
  html`<<%= tagName %>
27
- @counter-changed="${ev => console.log('==>', ev.detail)}" .heading=${heading}
27
+ @counterchange="${ev => console.log('==>', ev.detail)}" .heading=${heading}
28
28
  >some light-dom</<%= tagName %>
29
29
  >`,
30
30
  document.querySelector('#demo'),
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  import { css } from 'lit';
3
3
 
4
- export default css`:host {
4
+ export const styles = css`:host {
5
5
  display: block;
6
6
  box-sizing: border-box;
7
7
  }
@@ -45,8 +45,8 @@ export const TsWcLitElementMixin = (subclass) =>
45
45
 
46
46
  // write & rename el styles template
47
47
  this.copyTemplate(
48
- `${__dirname}/templates/styles/MyEl-styles.ts`,
49
- this.destinationPath(`src/styles/${className}-styles.ts`),
48
+ `${__dirname}/templates/styles/my-el-styles.css.ts`,
49
+ this.destinationPath(`src/styles/${tagName}-styles.css.ts`),
50
50
  );
51
51
 
52
52
  // write & rename el registration template
@@ -1,11 +1,9 @@
1
1
  import { html, LitElement } from 'lit';
2
2
  import { property } from 'lit/decorators.js';
3
- import styles from './styles/<%= className %>-styles.js';
3
+ import { styles } from './styles/<%= tagName %>-styles.css.js';
4
4
 
5
5
  export class <%= className %> extends LitElement {
6
- static get is(): string {
7
- return '<%= tagName %>';
8
- }
6
+ static is: string = '<%= tagName %>';
9
7
 
10
8
  static override styles = [styles];
11
9
 
@@ -32,7 +30,7 @@ export class <%= className %> extends LitElement {
32
30
 
33
31
  #onClick() {
34
32
  this.counter += 1;
35
- this.dispatchEvent(new CustomEvent('counter-changed', { detail: this.counter }));
33
+ this.dispatchEvent(new CustomEvent('counterchange', { detail: this.counter }));
36
34
  }
37
35
 
38
36
  /**
@@ -13,8 +13,8 @@
13
13
  "./index.js": {
14
14
  "default": "./dist/index.js"
15
15
  },
16
- "./src/styles/<%= className %>-styles.js": {
17
- "default": "./dist/src/styles/<%= className %>-styles.js"
16
+ "./src/styles/<%= tagName %>-styles.css.js": {
17
+ "default": "./dist/src/styles/<%= tagName %>-styles.css.js"
18
18
  }
19
19
  },
20
20
  "main": "dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "wds": "web-dev-server"
33
33
  },
34
34
  "devDependencies": {
35
- "tslib": "^2.4.1",
36
- "typescript": "^4.9.4"
35
+ "tslib": "^2.5.0",
36
+ "typescript": "^4.9.5"
37
37
  }
38
38
  }
@@ -24,7 +24,7 @@
24
24
  const heading = 'World!';
25
25
  render(
26
26
  html`<<%= tagName %>
27
- @counter-changed="${ev => console.log('==>', ev.detail)}" .heading=${heading}
27
+ @counterchange="${ev => console.log('==>', ev.detail)}" .heading=${heading}
28
28
  >some light-dom</<%= tagName %>
29
29
  >`,
30
30
  document.querySelector('#demo'),
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  import { css } from 'lit';
3
3
 
4
- export default css`:host {
4
+ export const styles = css`:host {
5
5
  display: block;
6
6
  box-sizing: border-box;
7
7
  }