From 403f3e42e1edb5e7b126866827d9f1cd68fca6ae Mon Sep 17 00:00:00 2001 From: wangjunjia Date: Sun, 18 Jun 2023 18:50:04 +0800 Subject: [PATCH 1/3] feat(shell-electron): add cli usage without electron --- .gitignore | 1 + .yarnrc.yml | 1 + package.json | 2 +- packages/api/package.json | 2 +- packages/app-backend-api/package.json | 4 +- packages/app-backend-core/package.json | 2 +- packages/app-backend-vue3/package.json | 4 +- packages/build-tools/package.json | 2 +- packages/docs/src/guide/installation.md | 2 +- packages/shell-electron/README.md | 2 +- packages/shell-electron/app.html | 29 +- packages/shell-electron/app.js | 7 +- packages/shell-electron/cli.js | 3 + packages/shell-electron/package.json | 6 +- packages/shell-electron/server.js | 17 +- packages/shell-electron/src/devtools.js | 3 +- packages/shell-host/package.json | 2 +- yarn.lock | 28324 +++++++++++++--------- 18 files changed, 16693 insertions(+), 11720 deletions(-) create mode 100644 .yarnrc.yml create mode 100644 packages/shell-electron/cli.js diff --git a/.gitignore b/.gitignore index 240714ca2..8cbf4c041 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ TODOs.md .idea .web-extension-id yarn-error.log +.yarn/* /packages/*/lib .amo.env.json diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 000000000..3186f3f07 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/package.json b/package.json index d71ab8597..df624de0e 100644 --- a/package.json +++ b/package.json @@ -80,4 +80,4 @@ "engines": { "node": ">=8.10" } -} \ No newline at end of file +} diff --git a/packages/api/package.json b/packages/api/package.json index 0fe878b42..b82eb197c 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -34,4 +34,4 @@ "@types/webpack-env": "^1.15.1", "typescript": "^4.5.2" } -} \ No newline at end of file +} diff --git a/packages/app-backend-api/package.json b/packages/app-backend-api/package.json index 64bb1f599..b35d198d3 100644 --- a/packages/app-backend-api/package.json +++ b/packages/app-backend-api/package.json @@ -10,8 +10,8 @@ "ts": "tsc -d -outDir lib" }, "dependencies": { - "@vue/devtools-api": "^6.0.0-beta.1", - "@vue-devtools/shared-utils": "^0.0.0" + "@vue-devtools/shared-utils": "^0.0.0", + "@vue/devtools-api": "^6.0.0-beta.1" }, "devDependencies": { "@types/node": "^13.9.1", diff --git a/packages/app-backend-core/package.json b/packages/app-backend-core/package.json index ce1e5093a..7058266bb 100644 --- a/packages/app-backend-core/package.json +++ b/packages/app-backend-core/package.json @@ -10,12 +10,12 @@ "ts": "tsc -d -outDir lib" }, "dependencies": { - "@vue/devtools-api": "^6.0.0-beta.1", "@vue-devtools/app-backend-api": "^0.0.0", "@vue-devtools/app-backend-vue1": "^0.0.0", "@vue-devtools/app-backend-vue2": "^0.0.0", "@vue-devtools/app-backend-vue3": "^0.0.0", "@vue-devtools/shared-utils": "^0.0.0", + "@vue/devtools-api": "^6.0.0-beta.1", "lodash": "^4.17.21", "speakingurl": "^14.0.1" }, diff --git a/packages/app-backend-vue3/package.json b/packages/app-backend-vue3/package.json index 279544d59..92dcfb6e5 100644 --- a/packages/app-backend-vue3/package.json +++ b/packages/app-backend-vue3/package.json @@ -10,9 +10,9 @@ "ts": "tsc -d -outDir lib" }, "dependencies": { - "@vue/devtools-api": "^6.0.0-beta.1", "@vue-devtools/app-backend-api": "^0.0.0", - "@vue-devtools/shared-utils": "^0.0.0" + "@vue-devtools/shared-utils": "^0.0.0", + "@vue/devtools-api": "^6.0.0-beta.1" }, "devDependencies": { "@types/node": "^13.9.1", diff --git a/packages/build-tools/package.json b/packages/build-tools/package.json index 8a2d2c6a9..7e6e6afb7 100644 --- a/packages/build-tools/package.json +++ b/packages/build-tools/package.json @@ -16,9 +16,9 @@ "monaco-editor-webpack-plugin": "^3.1.0", "path-browserify": "^1.0.1", "postcss-loader": "^5.2.0", + "style-resources-loader": "^1.2.1", "stylus": "^0.54.5", "stylus-loader": "^5.0.0", - "style-resources-loader": "^1.2.1", "terser-webpack-plugin": "^5.1.1", "vue-loader": "^15.7.1", "vue-template-compiler": "^2.7.10", diff --git a/packages/docs/src/guide/installation.md b/packages/docs/src/guide/installation.md index ee032126c..2077f5431 100644 --- a/packages/docs/src/guide/installation.md +++ b/packages/docs/src/guide/installation.md @@ -127,7 +127,7 @@ npm install --save-dev @vue/devtools Once you installed the package globally, run: ```bash -vue-devtools +vue-devtools # or use vue-devtools-cli without electron ``` Then add this code to the `` section of your application HTML file: diff --git a/packages/shell-electron/README.md b/packages/shell-electron/README.md index 1d2193697..42c1d72ee 100644 --- a/packages/shell-electron/README.md +++ b/packages/shell-electron/README.md @@ -20,7 +20,7 @@ npm install --save-dev @vue/devtools Once you installed the package globally, run: ```bash -vue-devtools +vue-devtools # or use vue-devtools-cli without electron ``` Then add: diff --git a/packages/shell-electron/app.html b/packages/shell-electron/app.html index 2a207897c..ae148d9ec 100644 --- a/packages/shell-electron/app.html +++ b/packages/shell-electron/app.html @@ -2,7 +2,11 @@ + + + Vue Developer Tools + @@ -82,7 +95,7 @@

- +
to the top of the page you want to debug. @@ -90,15 +103,19 @@