@pulse-editor/cli 0.1.1-beta.3 → 0.1.1-beta.5
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.
|
@@ -34,7 +34,7 @@ export default function Dev({ cli }) {
|
|
|
34
34
|
}
|
|
35
35
|
// Start dev server
|
|
36
36
|
await cleanDist();
|
|
37
|
-
await execa(`${getDepsBinPath('concurrently')} --prefix none "webpack --mode development --watch" "tsx watch --clear-screen=false node_modules/@pulse-editor/cli/dist/lib/server/express.js"`, {
|
|
37
|
+
await execa(`${getDepsBinPath('concurrently')} --prefix none "npx webpack --mode development --watch" "tsx watch --clear-screen=false node_modules/@pulse-editor/cli/dist/lib/server/express.js"`, {
|
|
38
38
|
stdio: 'inherit',
|
|
39
39
|
shell: true,
|
|
40
40
|
env: {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
1
2
|
// Get deps bin at node_modules/@pulse-editor/cli/node_modules
|
|
2
3
|
export function getDepsBinPath(name) {
|
|
3
4
|
const workingDir = process.cwd();
|
|
4
|
-
|
|
5
|
+
// Check if the package is installed in the node_modules, if yes, just return "npx <name>"
|
|
6
|
+
if (fs.existsSync(`${workingDir}/node_modules/${name}`)) {
|
|
7
|
+
return `npx ${name}`;
|
|
8
|
+
}
|
|
9
|
+
// Check if the package exists in node_modules/@pulse-editor/cli/node_modules
|
|
10
|
+
else if (fs.existsSync(`${workingDir}/node_modules/@pulse-editor/cli/node_modules/${name}`)) {
|
|
11
|
+
return `${workingDir}/node_modules/@pulse-editor/cli/node_modules/.bin/${process.platform === 'win32' ? `${name}.cmd` : name}`;
|
|
12
|
+
}
|
|
13
|
+
throw new Error(`Dependency ${name} not found.`);
|
|
5
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulse-editor/cli",
|
|
3
|
-
"version": "0.1.1-beta.
|
|
3
|
+
"version": "0.1.1-beta.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pulse": "dist/cli.js"
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"ink-select-input": "^6.2.0",
|
|
33
33
|
"ink-spinner": "^5.0.0",
|
|
34
34
|
"ink-text-input": "^6.0.0",
|
|
35
|
+
"livereload": "^0.10.3",
|
|
35
36
|
"meow": "^14.0.0",
|
|
36
37
|
"openid-client": "^6.8.1",
|
|
37
38
|
"react": "^19.2.0",
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
"eslint-plugin-react": "^7.37.5",
|
|
53
54
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
54
55
|
"ink-testing-library": "^4.0.0",
|
|
55
|
-
"livereload": "^0.10.3",
|
|
56
56
|
"prettier": "^3.6.2",
|
|
57
57
|
"ts-node": "^10.9.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
@@ -75,4 +75,4 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"prettier": "@vdemedes/prettier-config"
|
|
78
|
-
}
|
|
78
|
+
}
|