@pulse-editor/cli 0.1.0-beta.5 → 0.1.0-beta.7
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.
|
@@ -122,10 +122,12 @@ export default function Create({ cli }) {
|
|
|
122
122
|
try {
|
|
123
123
|
await execa(`npm install`, {
|
|
124
124
|
cwd: path.join(process.cwd(), name),
|
|
125
|
+
stdio: 'inherit',
|
|
126
|
+
shell: true,
|
|
125
127
|
});
|
|
126
128
|
}
|
|
127
129
|
catch (error) {
|
|
128
|
-
setCreateMessage(
|
|
130
|
+
setCreateMessage(_jsxs(Text, { color: "redBright", children: ["\u274C Failed to install dependencies. Please check your internet connection and try again. ", error.message] }));
|
|
129
131
|
return;
|
|
130
132
|
}
|
|
131
133
|
setCreateMessage(_jsx(Text, { children: "\uD83D\uDE80 Pulse Editor React app project created successfully!" }));
|
|
@@ -45,14 +45,24 @@ export default function Publish({ cli }) {
|
|
|
45
45
|
// Build the extension
|
|
46
46
|
useEffect(() => {
|
|
47
47
|
async function buildExtension() {
|
|
48
|
+
setIsBuilding(true);
|
|
48
49
|
try {
|
|
49
|
-
setIsBuilding(true);
|
|
50
50
|
await $ `npm run build`;
|
|
51
|
-
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
setIsBuildingError(true);
|
|
54
|
+
setIsBuilding(false);
|
|
55
|
+
setFailureMessage('Build failed. Please run `npm run build` to see the error.');
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// Zip the dist folder
|
|
59
|
+
try {
|
|
52
60
|
await $({ cwd: 'dist' }) `zip -r ../node_modules/@pulse-editor/dist.zip *`;
|
|
53
61
|
}
|
|
54
62
|
catch (error) {
|
|
55
63
|
setIsBuildingError(true);
|
|
64
|
+
setIsBuilding(false);
|
|
65
|
+
setFailureMessage('Failed to zip the build output.');
|
|
56
66
|
return;
|
|
57
67
|
}
|
|
58
68
|
finally {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulse-editor/cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
|
-
"pulse": "
|
|
6
|
+
"pulse": "dist/cli.js"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
9
|
"engines": {
|
|
@@ -60,4 +60,4 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"prettier": "@vdemedes/prettier-config"
|
|
63
|
-
}
|
|
63
|
+
}
|