From 73f063dadc88d2c45bbcff03d979b1fd57d31ccc Mon Sep 17 00:00:00 2001 From: zjxxxxxxxxx <43126836+zjxxxxxxxxx@users.noreply.github.com> Date: Sun, 24 Sep 2023 14:23:18 +0800 Subject: [PATCH] chore: update playground (#92) --- README.md | 7 ++-- package.json | 2 +- .../src/elements/defineTooltipElement.ts | 3 +- .../client/src/elements/defineTreeElement.ts | 17 ++++----- .../client/src/resolve/createVueResolver.ts | 1 + packages/rollup/package.json | 2 +- packages/vite/package.json | 2 +- packages/webpack/package.json | 2 +- playground/rollup-react15/src/App.tsx | 4 ++- .../src/{ => components}/Notes.tsx | 7 ++-- .../src/{ => components}/tree/SubTree1.tsx | 0 .../src/{ => components}/tree/SubTree2.tsx | 0 .../src/{ => components}/tree/SubTree3.tsx | 0 .../src/{ => components}/tree/index.tsx | 0 playground/rollup-vue2/src/App.vue | 20 +++++++++-- .../rollup-vue2/src/components/HelloWorld.vue | 33 ------------------ .../rollup-vue2/src/components/Notes.vue | 17 +++------ playground/vite-react/src/App.tsx | 4 ++- .../src/components}/Notes.tsx | 13 ++++--- .../src/{ => components}/tree/SubTree1.tsx | 0 .../src/{ => components}/tree/SubTree2.tsx | 0 .../src/{ => components}/tree/SubTree3.tsx | 0 .../src/{ => components}/tree/index.tsx | 0 playground/vite-vue/src/App.vue | 18 ++++++++-- .../vite-vue/src/components/HelloWorld.vue | 22 ------------ playground/vite-vue/src/components/Notes.vue | 10 +++--- playground/webpack-next/src/App.tsx | 4 ++- .../src/components}/Notes.tsx | 11 +++--- .../src/{ => components}/tree/SubTree1.tsx | 0 .../src/{ => components}/tree/SubTree2.tsx | 0 .../src/{ => components}/tree/SubTree3.tsx | 0 .../src/{ => components}/tree/index.tsx | 0 playground/webpack-vue/src/App.vue | 26 ++++++++++---- .../webpack-vue/src/components/HelloWorld.vue | 22 ------------ .../webpack-vue/src/components/Notes.vue | 10 +++--- public/demo.gif | Bin 4768900 -> 3450042 bytes 36 files changed, 105 insertions(+), 152 deletions(-) rename playground/rollup-react15/src/{ => components}/Notes.tsx (66%) rename playground/rollup-react15/src/{ => components}/tree/SubTree1.tsx (100%) rename playground/rollup-react15/src/{ => components}/tree/SubTree2.tsx (100%) rename playground/rollup-react15/src/{ => components}/tree/SubTree3.tsx (100%) rename playground/rollup-react15/src/{ => components}/tree/index.tsx (100%) delete mode 100644 playground/rollup-vue2/src/components/HelloWorld.vue rename playground/{webpack-next/src => vite-react/src/components}/Notes.tsx (53%) rename playground/vite-react/src/{ => components}/tree/SubTree1.tsx (100%) rename playground/vite-react/src/{ => components}/tree/SubTree2.tsx (100%) rename playground/vite-react/src/{ => components}/tree/SubTree3.tsx (100%) rename playground/vite-react/src/{ => components}/tree/index.tsx (100%) delete mode 100644 playground/vite-vue/src/components/HelloWorld.vue rename playground/{vite-react/src => webpack-next/src/components}/Notes.tsx (61%) rename playground/webpack-next/src/{ => components}/tree/SubTree1.tsx (100%) rename playground/webpack-next/src/{ => components}/tree/SubTree2.tsx (100%) rename playground/webpack-next/src/{ => components}/tree/SubTree3.tsx (100%) rename playground/webpack-next/src/{ => components}/tree/index.tsx (100%) delete mode 100644 playground/webpack-vue/src/components/HelloWorld.vue diff --git a/README.md b/README.md index 8bc43106..f3e31740 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,11 @@ [![CI](https://github.com/zjxxxxxxxxx/open-editor/actions/workflows/ci.yml/badge.svg)](https://github.com/zjxxxxxxxxx/open-editor/actions/workflows/ci.yml) [![MIT](https://img.shields.io/github/license/zjxxxxxxxxx/open-editor)](https://opensource.org/licenses/MIT) -A web devtools for fast find source code. +A web devtools for fast find source code, supported in react and vue. -![image](./public//demo.gif) +If you need to switch back and forth between react and vue frequently, or if you have both react and vue in the same project, then this devtools is for you. + +![image](./public/demo.gif) ## Features @@ -123,7 +125,6 @@ By default, you can only open to `file`, if you want to open to `line` and `colu -
- press hotkey ⌨️ command ⌘ + 🖱 click, show component tree. + press hotkey ⌨️ option ⌥ + command ⌘ +{' '} + O, then press hotkey ⌨️ command ⌘ + 🖱 click, show + component tree.
-press hotkey ⌨️ esc or 🖱 right-click to exit inspect.
diff --git a/playground/rollup-react15/src/tree/SubTree1.tsx b/playground/rollup-react15/src/components/tree/SubTree1.tsx similarity index 100% rename from playground/rollup-react15/src/tree/SubTree1.tsx rename to playground/rollup-react15/src/components/tree/SubTree1.tsx diff --git a/playground/rollup-react15/src/tree/SubTree2.tsx b/playground/rollup-react15/src/components/tree/SubTree2.tsx similarity index 100% rename from playground/rollup-react15/src/tree/SubTree2.tsx rename to playground/rollup-react15/src/components/tree/SubTree2.tsx diff --git a/playground/rollup-react15/src/tree/SubTree3.tsx b/playground/rollup-react15/src/components/tree/SubTree3.tsx similarity index 100% rename from playground/rollup-react15/src/tree/SubTree3.tsx rename to playground/rollup-react15/src/components/tree/SubTree3.tsx diff --git a/playground/rollup-react15/src/tree/index.tsx b/playground/rollup-react15/src/components/tree/index.tsx similarity index 100% rename from playground/rollup-react15/src/tree/index.tsx rename to playground/rollup-react15/src/components/tree/index.tsx diff --git a/playground/rollup-vue2/src/App.vue b/playground/rollup-vue2/src/App.vue index 17dd7716..cdf8f522 100644 --- a/playground/rollup-vue2/src/App.vue +++ b/playground/rollup-vue2/src/App.vue @@ -1,10 +1,12 @@ @@ -19,7 +21,16 @@ export default Vue.extend({+ + Github + +
@@ -36,4 +47,7 @@ export default Vue.extend({ .logo.vue:hover { filter: drop-shadow(0 0 2em #42b883aa); } +.read-the-docs { + color: #888; +} diff --git a/playground/rollup-vue2/src/components/HelloWorld.vue b/playground/rollup-vue2/src/components/HelloWorld.vue deleted file mode 100644 index 507c2686..00000000 --- a/playground/rollup-vue2/src/components/HelloWorld.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - diff --git a/playground/rollup-vue2/src/components/Notes.vue b/playground/rollup-vue2/src/components/Notes.vue index 8f847fde..128f6e46 100644 --- a/playground/rollup-vue2/src/components/Notes.vue +++ b/playground/rollup-vue2/src/components/Notes.vue @@ -1,22 +1,13 @@ - -press hotkey ⌨️ option ⌥ + command ⌘ + O, then click the HTML element you wish to inspect.
-press hotkey ⌨️ command ⌘ + 🖱 click, show component tree.
-+ press hotkey ⌨️ option ⌥ + command ⌘ + O, + then press hotkey ⌨️ command ⌘ + 🖱 click, show component tree. +
press hotkey ⌨️ esc or 🖱 right-click to exit inspect.
press hotkey ⌨️ option ⌥ + command ⌘ +{' '} O, then click the HTML element you wish to inspect.
- press hotkey ⌨️ command ⌘ + 🖱 click, show component tree. + press hotkey ⌨️ option ⌥ + command ⌘ +{' '} + O, then press hotkey ⌨️ command ⌘ + 🖱 click, show + component tree.
-press hotkey ⌨️ esc or 🖱 right-click to exit inspect.
- > ++ + Github + +
diff --git a/playground/vite-vue/src/components/HelloWorld.vue b/playground/vite-vue/src/components/HelloWorld.vue deleted file mode 100644 index b774e104..00000000 --- a/playground/vite-vue/src/components/HelloWorld.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - -- - Github - -
- - - diff --git a/playground/vite-vue/src/components/Notes.vue b/playground/vite-vue/src/components/Notes.vue index e42efb3d..acb45cc9 100644 --- a/playground/vite-vue/src/components/Notes.vue +++ b/playground/vite-vue/src/components/Notes.vue @@ -1,13 +1,11 @@ - -press hotkey ⌨️ option ⌥ + command ⌘ + O, then click the HTML element you wish to inspect.
-press hotkey ⌨️ command ⌘ + 🖱 click, show component tree.
-+ press hotkey ⌨️ option ⌥ + command ⌘ + O, + then press hotkey ⌨️ command ⌘ + 🖱 click, show component tree. +
press hotkey ⌨️ esc or 🖱 right-click to exit inspect.
diff --git a/playground/webpack-next/src/App.tsx b/playground/webpack-next/src/App.tsx index bd0e14cc..4d872d61 100644 --- a/playground/webpack-next/src/App.tsx +++ b/playground/webpack-next/src/App.tsx @@ -1,5 +1,6 @@ import Head from 'next/head'; -import Notes from './Notes'; +import Tree from './components/tree'; +import Notes from './components/Notes'; export default function App() { return ( @@ -26,6 +27,7 @@ export default function App() {press hotkey ⌨️ option ⌥ + command ⌘ +{' '} O, then click the HTML element you wish to inspect.
- press hotkey ⌨️ command ⌘ + 🖱 click, show component tree. + press hotkey ⌨️ option ⌥ + command ⌘ +{' '} + O, then press hotkey ⌨️ command ⌘ + 🖱 click, show + component tree.
-press hotkey ⌨️ esc or 🖱 right-click to exit inspect.
- > ++ + Github + +
diff --git a/playground/webpack-vue/src/components/HelloWorld.vue b/playground/webpack-vue/src/components/HelloWorld.vue deleted file mode 100644 index b774e104..00000000 --- a/playground/webpack-vue/src/components/HelloWorld.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - -- - Github - -
- - - diff --git a/playground/webpack-vue/src/components/Notes.vue b/playground/webpack-vue/src/components/Notes.vue index e42efb3d..acb45cc9 100644 --- a/playground/webpack-vue/src/components/Notes.vue +++ b/playground/webpack-vue/src/components/Notes.vue @@ -1,13 +1,11 @@ - -press hotkey ⌨️ option ⌥ + command ⌘ + O, then click the HTML element you wish to inspect.
-press hotkey ⌨️ command ⌘ + 🖱 click, show component tree.
-+ press hotkey ⌨️ option ⌥ + command ⌘ + O, + then press hotkey ⌨️ command ⌘ + 🖱 click, show component tree. +
press hotkey ⌨️ esc or 🖱 right-click to exit inspect.
diff --git a/public/demo.gif b/public/demo.gif index 564865632f32a5e0ca23a2f3c6fa6eb5e57bf77b..ec94d442713dea61c2482b9dd8e3e3655e293569 100644 GIT binary patch literal 3450042 zcmV)EK)}C8Nk%w1VITv-0r&m@C3mZ8Z*)6JSO6OWcFBGuDlv3?B$Wz#LWy7J&qyQ @dD>YhRmMM
z!qP{-^Ua?C4IFzep}jyXN63%dFt%M|$z`u}yI?9Yv+!Gq`k#;`yYRscmn-x)U@Np3
zJ~UL|>v0q?n l^>UjRe?%vpD!P
z|M*6U*Dt>D1ve5<(G%m76BCpEOB_jLCCUFKjvmd_vgDkV_nq-Ltd7+z2a_fYgB>&igt4TSkCMl{l8>)4>k9WOMzZP+(R(Ew
z7}6xn(M@PpozBYz4eyAA2%w&K(mbxT!Uj?kHvic
1x~J@pu~La4D2pa
z2HJT3B|Kl?(qz+gRk3vp+kKaQ3nzjM_sxEx)*9Y+U0m=D7t80Hqd){GI;4EG+A!LzD|hkM#*~Oe0hsK
zv->W3aiL&Jjb+c8@5`0FEA@v?rVr~sO7|Gr5PKq_wyyiOR}%qRh|6Qi)eN&gyb{xI
z^wr|Di*YA~3yFP8>s}?=w1H4)gIZZB@+`MWq
?PYMXBI4J$@jinT`nDn*TRgD!3uH0L7aFj0G?MOp2!~_{mFi!Ly1aNvz
z*raN%bG3#xGlB{tdm}wA4Y+GEtb6c`DRO8iqz~6}Ler6c53|bccoLZ1_n}r1bIGL}
zn?o66`whYxmRU^XS~LxMa61}&
S0%<5sQZ|G_e8CO0%RusxW()
zI9anVJ!#qQc&r;@wp#-g*P1jGiQ8Ve2z|{_xZ5gcH6|JM95jIh%MK5#LXvWApr+CB
z!7xn0H}s8MJB7DAPcb0~wFTg--dHZABpBu#uB7s>JD+w+@=QsGrEWH_i;4`!1ZYKy
zzAr