@blockquote/create-wc 1.24.0 → 1.26.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
@@ -202,6 +202,11 @@ Example:
202
202
  ```css
203
203
  ./
204
204
  ├── my-el/
205
+ │ ├── .husky/
206
+ │ │ ├── _/
207
+ │ │ │ ├── .gitignore
208
+ │ │ │ └── husky.sh
209
+ │ │ └── pre-commit
205
210
  │ ├── define/
206
211
  │ │ └── my-el.{js,ts}
207
212
  │ ├── demo/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockquote/create-wc",
3
- "version": "1.24.0",
3
+ "version": "1.26.0",
4
4
  "description": "Web component with Lit scaffolding - Extending Open Web Component",
5
5
  "keywords": [
6
6
  "LitElement",
@@ -40,16 +40,16 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@open-wc/create": "^0.38.70",
43
- "chalk": "^5.2.0",
43
+ "chalk": "^5.3.0",
44
44
  "command-line-args": "^5.2.1",
45
45
  "prompts": "^2.4.2",
46
- "semver": "^7.5.0"
46
+ "semver": "^7.5.3"
47
47
  },
48
48
  "devDependencies": {
49
- "@open-wc/eslint-config": "^10.0.0",
50
- "eslint": "^8.38.0",
49
+ "@open-wc/eslint-config": "^12.0.0",
50
+ "eslint": "^8.44.0",
51
51
  "eslint-config-prettier": "^8.8.0",
52
- "prettier": "^2.8.7"
52
+ "prettier": "^2.8.8"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=14.15.0"
@@ -9,11 +9,6 @@
9
9
  "lint:prettier": "prettier \"**/*.{js,ts,json,html}\" --check --ignore-path .eslintignore",
10
10
  "lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .eslintignore"
11
11
  },
12
- "husky": {
13
- "hooks": {
14
- "pre-commit": "lint-staged"
15
- }
16
- },
17
12
  "lint-staged": {
18
13
  "**/*.{js,ts,html}": [
19
14
  "npm run format:eslint"
@@ -92,14 +87,14 @@
92
87
  }
93
88
  },
94
89
  "devDependencies": {
95
- "@open-wc/eslint-config": "^10.0.0",
96
- "eslint": "^8.38.0",
90
+ "@open-wc/eslint-config": "^12.0.0",
91
+ "eslint": "^8.44.0",
97
92
  "eslint-config-prettier": "^8.8.0",
98
93
  "eslint-plugin-log-filenames": "^1.0.6",
99
- "husky": "^4.3.8",
100
- "lint-staged": "^13.2.1",
101
- "prettier": "^2.8.7",
102
- "stylelint": "^15.5.0",
103
- "stylelint-config-standard-scss": "^8.0.0"
94
+ "husky": "^8.0.3",
95
+ "lint-staged": "^13.2.3",
96
+ "prettier": "^2.8.8",
97
+ "stylelint": "^15.9.0",
98
+ "stylelint-config-standard-scss": "^10.0.0"
104
99
  }
105
100
  }
@@ -1,5 +1,6 @@
1
1
  import { fileURLToPath } from 'url';
2
- import { dirname } from 'path';
2
+ import path, { dirname } from 'path';
3
+ import fs from 'fs';
3
4
 
4
5
  const __filename = fileURLToPath(import.meta.url);
5
6
  const __dirname = dirname(__filename);
@@ -31,10 +32,30 @@ export const CommonRepoMixin = (subclass) =>
31
32
  // write and rename .gitignore
32
33
  this.copyTemplate(`${__dirname}/templates/gitignore`, this.destinationPath(`.gitignore`));
33
34
 
34
- // write and rename .gitignore
35
- this.copyTemplate(`${__dirname}/templates/eslintignore`, this.destinationPath(`.eslintignore`));
35
+ // write and rename .eslintignore
36
+ this.copyTemplate(
37
+ `${__dirname}/templates/eslintignore`,
38
+ this.destinationPath(`.eslintignore`),
39
+ );
36
40
 
37
41
  // copy all other files
38
42
  await this.copyTemplates(`${__dirname}/templates/static/**/*`);
39
43
  }
44
+
45
+ async end() {
46
+ await super.end();
47
+
48
+ const { destinationPath } = this.options;
49
+
50
+ if (destinationPath) {
51
+ const huskyPreCommit = path.join(this.options.destinationPath, '.husky/pre-commit');
52
+ try {
53
+ fs.chmodSync(huskyPreCommit, 0o755);
54
+ } catch (err) {
55
+ if (err.code !== 'ENOENT') {
56
+ throw err;
57
+ }
58
+ }
59
+ }
60
+ }
40
61
  };
@@ -18,25 +18,26 @@
18
18
  "preview:vite": "vite preview",
19
19
  "analyze": "cem analyze --litelement --globs \"{src,define}/**/*.{js,ts}\" \"index.js\"",
20
20
  "sort:package": "npx sort-package-json",
21
- "postinstall": "npm run sort:package"
21
+ "postinstall": "npm run sort:package",
22
+ "prepare": "husky install"
22
23
  },
23
24
  "dependencies": {
24
- "lit": "^2.5.0"
25
+ "lit": "^2.7.5"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@blockquote/rollup-plugin-total-bundlesize": "^2.0.1",
28
29
  "@blockquote/sass-style-template": "^3.0.1",
29
30
  "@blockquote/coverage-table-reporter": "^1.0.0",
30
- "@custom-elements-manifest/analyzer": "^0.8.0",
31
+ "@custom-elements-manifest/analyzer": "^0.8.3",
31
32
  "@ungap/global-this": "^0.4.4",
32
33
  "@web/rollup-plugin-html": "^2.0.0",
33
34
  "@webcomponents/shadycss": "^1.11.2",
34
35
  "@webcomponents/webcomponentsjs": "^2.8.0",
35
- "concurrently": "^8.0.1",
36
+ "concurrently": "^8.2.0",
36
37
  "rollup-plugin-copy": "^3.4.0",
37
38
  "tiny-array-flat-polyfill": "^0.2.1",
38
- "vite": "^4.3.1",
39
- "sort-package-json": "^2.4.1"
39
+ "vite": "^4.3.9",
40
+ "sort-package-json": "^2.5.0"
40
41
  },
41
42
  "publishConfig": {
42
43
  "access": "public"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ npx --no-install lint-staged
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@typescript-eslint/eslint-plugin": "^5.59.0",
26
- "@typescript-eslint/parser": "^5.59.0"
25
+ "@typescript-eslint/eslint-plugin": "^5.61.0",
26
+ "@typescript-eslint/parser": "^5.61.0"
27
27
  }
28
28
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "devDependencies": {
3
- "@open-wc/testing": "^3.1.8",
4
- "@web/test-runner": "^0.16.0",
5
- "@web/test-runner-playwright": "^0.10.0"
3
+ "@open-wc/testing": "^3.2.0",
4
+ "@web/test-runner": "^0.16.1",
5
+ "@web/test-runner-playwright": "^0.10.1"
6
6
  }
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "devDependencies": {
3
- "@open-wc/testing": "^3.1.8",
4
- "@web/test-runner": "^0.16.0",
5
- "@web/test-runner-playwright": "^0.10.0"
3
+ "@open-wc/testing": "^3.2.0",
4
+ "@web/test-runner": "^0.16.1",
5
+ "@web/test-runner-playwright": "^0.10.1"
6
6
  }
7
7
  }
@@ -3,7 +3,9 @@
3
3
  ".": {
4
4
  "default": "./index.js"
5
5
  },
6
- "./package.json": "./package.json",
6
+ "./package.json": {
7
+ "default": "./package.json"
8
+ },
7
9
  "./src/<%= className %>.js": {
8
10
  "default": "./src/<%= className %>.js"
9
11
  },
@@ -3,7 +3,9 @@
3
3
  ".": {
4
4
  "default": "./dist/index.js"
5
5
  },
6
- "./package.json": "./package.json",
6
+ "./package.json": {
7
+ "default": "./package.json"
8
+ },
7
9
  "./src/<%= className %>.js": {
8
10
  "default": "./dist/src/<%= className %>.js"
9
11
  },
@@ -30,7 +32,7 @@
30
32
  "sass:watch": "sass-style-template -j ts"
31
33
  },
32
34
  "devDependencies": {
33
- "tslib": "^2.5.0",
34
- "typescript": "^5.0.4"
35
+ "tslib": "^2.6.0",
36
+ "typescript": "^5.1.6"
35
37
  }
36
38
  }