Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy #1512

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Legacy #1512

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ To enable this feature, follow [this guide](./docs/open-in-editor.md).

### Manual Installation

This is only necessary when you want to build the extension yourself from source to get not-yet-released features.
This is only necessary when you want to build the extension with the source repo to get not-yet-released features.

**Make sure you are using Node 6+ and NPM 3+**

1. Clone this repo
2. `cd vue-devtools` the newly created folder
2. run `yarn install`
3. then run `yarn run build`
4. Open the Chrome extension page (currently under Menu > More Tools > Extensions)
4. Open the Chrome extension page (currently under `Menu` > `More Tools` > `Extensions`)
5. Check "developer mode" on the top-right corner
6. Click the "load unpacked" button on the left, and choose the folder: `vue-devtools/packages/shell-chrome/`
7. Alternatilvely to step 3, you can also use `yarn dev:chrome` to build & watch the unpacked extension
7. Alternatively to step 3, you can also use `yarn dev:chrome` to build & watch the unpacked extension

### Development

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-devtools",
"version": "5.3.3",
"version": "5.3.4",
"description": "devtools for Vue.js!",
"private": true,
"workspaces": [
Expand Down
1 change: 1 addition & 0 deletions packages/app-frontend/src/components/ActionHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
color #ccc

.vue-ui-icon
min-width 16px
width 16px
height @width
margin-right 0
Expand Down
3 changes: 3 additions & 0 deletions packages/app-frontend/src/views/routes/RoutesMeta.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export default {
if (routeData.name && routeData.name !== UNDEFINED) {
data.name = routeData.name
}
if (routeData.meta && !this.isEmptyObject(routeData.meta)) {
data.meta = routeData.meta
}
if (routeData.component) {
const component = {}
// if (routeData.component.__file) {
Expand Down
4 changes: 2 additions & 2 deletions packages/shell-chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Vue.js devtools",
"version": "5.3.3",
"version_name": "5.3.3",
"version": "5.3.4",
"version_name": "5.3.4",
"description": "Chrome and Firefox DevTools extension for debugging Vue.js applications.",
"manifest_version": 2,
"icons": {
Expand Down
17 changes: 13 additions & 4 deletions packages/shell-chrome/src/devtools-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ chrome.runtime.onMessage.addListener(request => {
if (request === 'vue-panel-load') {
onPanelLoad()
} else if (request.vueToast) {
toast(request.vueToast.message, request.vueToast.type)
toast(request.vueToast)
} else if (request.vueContextMenu) {
onContextMenu(request.vueContextMenu)
}
Expand All @@ -65,10 +65,10 @@ function onContextMenu ({ id }) {
if (typeof res !== 'undefined' && res) {
panelAction(() => {
chrome.runtime.sendMessage('vue-get-context-menu-target')
}, 'Open Vue devtools to see component details')
}, 'open-devtools')
} else {
pendingAction = null
toast('No Vue component was found', 'warn')
toast('component-not-found')
}
})
}
Expand Down Expand Up @@ -113,7 +113,16 @@ function onPanelHidden () {

// Toasts

function toast (message, type = 'normal') {
const toastMessages = {
'open-devtools': { message: 'Open Vue devtools to see component details', type: 'normal' },
'component-not-found': { message: 'No Vue component was found', type: 'warn' }
}

function toast (id) {
if (!Object.keys(toastMessages).includes(id)) return

const { message, type } = toastMessages[id]

const src = `(function() {
__VUE_DEVTOOLS_TOAST__(\`${message}\`, '${type}');
})()`
Expand Down
5 changes: 3 additions & 2 deletions packages/shell-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/devtools",
"version": "5.3.3",
"version": "5.3.4",
"description": "StandAlone vue-devtools",
"repository": {
"url": "https://github.com/vuejs/vue-devtools.git",
Expand Down Expand Up @@ -34,7 +34,8 @@
"@vue-devtools/app-frontend": "^0.0.0",
"@vue-devtools/build-tools": "^0.0.0",
"@vue-devtools/shared-utils": "^0.0.0",
"vue": "^2.6.12",
"webpack": "^4.19.0",
"webpack-cli": "^3.1.0"
}
}
}
16 changes: 15 additions & 1 deletion packages/shell-electron/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
export function connect(host?: string, port?: number|string): void
import type { VueConstructor } from "vue";

interface ConnectOptions {
io?: Function;
showToast?: Function;
app?: VueConstructor | VueConstructor[];
}

export function connect(
host?: string,
port?: number | string,
options?: ConnectOptions
): void;

export function init(vue: VueConstructor | VueConstructor[]): void;