Skip to content
Open

Legacy #1512

Show file tree
Hide file tree
Changes from 5 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
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
2 changes: 1 addition & 1 deletion 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