exportc 0.0.8 → 0.0.10
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/commands/init.js +10 -6
- package/package.json +2 -2
package/commands/init.js
CHANGED
|
@@ -145,7 +145,7 @@ export class Counter {
|
|
|
145
145
|
|
|
146
146
|
pkg.devDependencies = pkg.devDependencies || {};
|
|
147
147
|
if (!pkg.devDependencies.exportc) {
|
|
148
|
-
pkg.devDependencies.exportc = "
|
|
148
|
+
pkg.devDependencies.exportc = "latest";
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
@@ -237,19 +237,23 @@ declare module "export/" {
|
|
|
237
237
|
// Install dependencies in export/
|
|
238
238
|
console.log(pc.gray("Installing export dependencies..."));
|
|
239
239
|
try {
|
|
240
|
-
execSync("npm install", { cwd: exportDir, stdio: "
|
|
240
|
+
execSync("npm install", { cwd: exportDir, stdio: "inherit" });
|
|
241
241
|
console.log(pc.green("✓") + " Installed export dependencies");
|
|
242
|
-
} catch {
|
|
242
|
+
} catch (err) {
|
|
243
243
|
console.log(pc.yellow("!") + " Failed to install export dependencies");
|
|
244
|
+
if (err.message) console.log(pc.gray(err.message));
|
|
244
245
|
}
|
|
245
246
|
|
|
246
247
|
// Install exportc in main project
|
|
247
248
|
console.log(pc.gray("Installing exportc..."));
|
|
248
249
|
try {
|
|
249
|
-
execSync("npm install", { cwd, stdio: "
|
|
250
|
+
execSync("npm install", { cwd, stdio: "inherit", encoding: "utf8" });
|
|
250
251
|
console.log(pc.green("✓") + " Installed exportc");
|
|
251
|
-
} catch {
|
|
252
|
-
console.log(pc.yellow("!") + " Failed to install
|
|
252
|
+
} catch (err) {
|
|
253
|
+
console.log(pc.yellow("!") + " Failed to install exportc");
|
|
254
|
+
if (err.stdout) console.log(err.stdout);
|
|
255
|
+
if (err.stderr) console.log(pc.red(err.stderr));
|
|
256
|
+
console.log(pc.gray("Run 'npm install' manually to see the full error."));
|
|
253
257
|
}
|
|
254
258
|
|
|
255
259
|
// Done
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exportc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "CLI to add export to existing projects",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test test/init.test.mjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"picocolors": "^1.1.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"vite": "^5.0.0 || ^6.0.0"
|
|
46
|
+
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"vite": {
|