@blockquote/create-wc 2.8.2 → 2.8.4
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": "2.8.
|
|
3
|
+
"version": "2.8.4",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"chalk": "^5.6.2",
|
|
51
51
|
"command-line-args": "^6.0.1",
|
|
52
52
|
"prompts": "^2.4.2",
|
|
53
|
-
"semver": "^7.7.
|
|
53
|
+
"semver": "^7.7.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@eslint/js": "^9.39.2",
|
|
57
57
|
"@open-wc/eslint-config": "^13.0.0",
|
|
58
58
|
"eslint": "^9.39.2",
|
|
59
59
|
"eslint-config-prettier": "^10.1.8",
|
|
60
|
-
"prettier": "^3.
|
|
61
|
-
"globals": "^17.
|
|
60
|
+
"prettier": "^3.8.1",
|
|
61
|
+
"globals": "^17.3.0"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=18.20.3"
|
package/src/Generator.js
CHANGED
|
@@ -81,11 +81,17 @@ function spawnCommand(command, args, options = {}) {
|
|
|
81
81
|
* @param {string} command
|
|
82
82
|
* @param {object} options
|
|
83
83
|
*/
|
|
84
|
-
|
|
84
|
+
/**
|
|
85
|
+
* @param {string} command
|
|
86
|
+
* @param {string[]} args
|
|
87
|
+
* @param {object} options
|
|
88
|
+
* @param {string} errorAction - description of action for error message
|
|
89
|
+
*/
|
|
90
|
+
function runTask(command, args, options, errorAction) {
|
|
85
91
|
return new Promise((resolve, reject) => {
|
|
86
92
|
let child;
|
|
87
93
|
try {
|
|
88
|
-
child = spawnCommand(command,
|
|
94
|
+
child = spawnCommand(command, args, options);
|
|
89
95
|
} catch (error) {
|
|
90
96
|
reject(error);
|
|
91
97
|
return;
|
|
@@ -93,19 +99,27 @@ function _install(command = 'npm', options = {}) {
|
|
|
93
99
|
|
|
94
100
|
child.on('error', (error) => {
|
|
95
101
|
const cwd = normalizeCwd(options.cwd);
|
|
96
|
-
reject(new Error(`Failed to
|
|
102
|
+
reject(new Error(`Failed to ${errorAction} in ${cwd}: ${error.message}`));
|
|
97
103
|
});
|
|
98
104
|
|
|
99
105
|
child.on('close', (code) => {
|
|
100
106
|
if (code === 0) {
|
|
101
107
|
resolve();
|
|
102
108
|
} else {
|
|
103
|
-
reject(new Error(`${command}
|
|
109
|
+
reject(new Error(`${command} ${args.join(' ')} failed with code ${code}`));
|
|
104
110
|
}
|
|
105
111
|
});
|
|
106
112
|
});
|
|
107
113
|
}
|
|
108
114
|
|
|
115
|
+
/**
|
|
116
|
+
* @param {string} command
|
|
117
|
+
* @param {object} options
|
|
118
|
+
*/
|
|
119
|
+
function _install(command = 'npm', options = {}) {
|
|
120
|
+
return runTask(command, ['install'], options, `run ${command} install`);
|
|
121
|
+
}
|
|
122
|
+
|
|
109
123
|
/**
|
|
110
124
|
*
|
|
111
125
|
* @param {string} where
|
|
@@ -165,34 +179,12 @@ class Generator extends _Generator.default {
|
|
|
165
179
|
if (installDependencies === 'pnpm' || installDependencies === 'npm') {
|
|
166
180
|
await installNpm(this.options.destinationPath, installDependencies);
|
|
167
181
|
|
|
168
|
-
await
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
} catch (error) {
|
|
175
|
-
reject(error);
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
child.on('error', (error) => {
|
|
180
|
-
const cwd = normalizeCwd(this.options.destinationPath);
|
|
181
|
-
reject(
|
|
182
|
-
new Error(
|
|
183
|
-
`Failed to run ${installDependencies} run analyze in ${cwd}: ${error.message}`
|
|
184
|
-
)
|
|
185
|
-
);
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
child.on('close', (code) => {
|
|
189
|
-
if (code === 0) {
|
|
190
|
-
resolve();
|
|
191
|
-
} else {
|
|
192
|
-
reject(new Error(`${installDependencies} run analyze failed`));
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
});
|
|
182
|
+
await runTask(
|
|
183
|
+
installDependencies,
|
|
184
|
+
['run', 'analyze'],
|
|
185
|
+
{cwd: this.options.destinationPath},
|
|
186
|
+
`run ${installDependencies} run analyze`
|
|
187
|
+
);
|
|
196
188
|
}
|
|
197
189
|
}
|
|
198
190
|
}
|
|
@@ -69,21 +69,21 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@eslint/js": "^9.39.2",
|
|
72
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
73
|
-
"@html-eslint/parser": "^0.
|
|
72
|
+
"@html-eslint/eslint-plugin": "^0.54.2",
|
|
73
|
+
"@html-eslint/parser": "^0.54.0",
|
|
74
74
|
"eslint": "^9.39.2",
|
|
75
75
|
"eslint-config-prettier": "^10.1.8",
|
|
76
|
-
"eslint-plugin-html": "^8.1.
|
|
76
|
+
"eslint-plugin-html": "^8.1.4",
|
|
77
77
|
"eslint-plugin-import": "^2.32.0",
|
|
78
|
-
"eslint-plugin-lit": "^2.
|
|
78
|
+
"eslint-plugin-lit": "^2.2.1",
|
|
79
79
|
"eslint-plugin-lit-a11y": "^5.1.1",
|
|
80
|
-
"eslint-plugin-wc": "^3.0
|
|
81
|
-
"typescript-eslint": "^8.
|
|
82
|
-
"globals": "^17.
|
|
80
|
+
"eslint-plugin-wc": "^3.1.0",
|
|
81
|
+
"typescript-eslint": "^8.55.0",
|
|
82
|
+
"globals": "^17.3.0",
|
|
83
83
|
"husky": "^9.1.7",
|
|
84
84
|
"lint-staged": "^16.2.7",
|
|
85
|
-
"prettier": "^3.
|
|
86
|
-
"stylelint": "^
|
|
87
|
-
"stylelint-config-standard-scss": "^
|
|
85
|
+
"prettier": "^3.8.1",
|
|
86
|
+
"stylelint": "^17.2.0",
|
|
87
|
+
"stylelint-config-standard-scss": "^17.0.0"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@blockquote/cem-to-markdown-readme": "^1.0.0",
|
|
31
|
-
"@blockquote/rollup-plugin-total-bundlesize": "^2.
|
|
31
|
+
"@blockquote/rollup-plugin-total-bundlesize": "^2.3.0",
|
|
32
32
|
"@blockquote/sass-style-template": "^5.0.2",
|
|
33
33
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
34
34
|
"@open-wc/semantic-dom-diff": "^0.20.1",
|
|
35
35
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
36
|
-
"playwright": "^1.
|
|
37
|
-
"postcss-html": "^1.8.
|
|
36
|
+
"playwright": "^1.58.2",
|
|
37
|
+
"postcss-html": "^1.8.1",
|
|
38
38
|
"postcss-lit": "^1.3.1",
|
|
39
39
|
"@types/mocha": "^10.0.10",
|
|
40
40
|
"rollup-plugin-copy": "^3.5.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"tinyglobby": "^0.2.15",
|
|
43
43
|
"chai-a11y-axe": "^1.5.0",
|
|
44
44
|
"concurrently": "^9.2.1",
|
|
45
|
-
"sort-package-json": "^3.6.
|
|
46
|
-
"@vitest/browser-playwright": "^4.0.
|
|
47
|
-
"@vitest/coverage-istanbul": "^4.0.
|
|
48
|
-
"@vitest/coverage-v8": "^4.0.
|
|
49
|
-
"@vitest/ui": "^4.0.
|
|
50
|
-
"vitest": "^4.0.
|
|
45
|
+
"sort-package-json": "^3.6.1",
|
|
46
|
+
"@vitest/browser-playwright": "^4.0.18",
|
|
47
|
+
"@vitest/coverage-istanbul": "^4.0.18",
|
|
48
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
49
|
+
"@vitest/ui": "^4.0.18",
|
|
50
|
+
"vitest": "^4.0.18",
|
|
51
51
|
"vite": "^7.3.1"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|