https://github.com/ayamflow/vue-debug
A Vue.js plugin for debug helpers
https://github.com/ayamflow/vue-debug
Last synced: 10 months ago
JSON representation
A Vue.js plugin for debug helpers
- Host: GitHub
- URL: https://github.com/ayamflow/vue-debug
- Owner: ayamflow
- License: mit
- Created: 2014-06-29T20:59:38.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-12-07T20:06:59.000Z (over 11 years ago)
- Last Synced: 2025-08-21T01:24:56.668Z (10 months ago)
- Language: JavaScript
- Size: 130 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vue-debug
=========
DEPRECATED IN VUE 0.11+: use Vue.$log instead
A Vue.js plugin for debug helpers.
## How to use
### 1. Install the plugin.
With npm:
```
npm i vue-debug --save
```
With Component(1):
```
component install ayamflow/vue-debug
```
### 2. Mount
```
var vueDebug = require('vue-debug')
Vue.use('vue-debug')
```
If you use component(1), you can directly `Vue.use('vue-debug')`.
Check the [Vue.js documentation about plugins](http://vuejs.org/guide/plugin.html) for more information.
## Helpers list
### `Vue.log()`
Like `console.log` but only logs properties from the `$data` object, without any $get or $set method.
Thus, trying to log the vm itself will only log its `$data`.
If you need to log a VM internal such as `$compiler`, use the regular `console.log`.
#### Example:
```
var vm = new Vue({
el: 'body',
data: {
foo: 'bar',
bar: 10
},
ready: function() {
Vue.log(this.foo, this);
// output: 'bar', Object { foo: 'bar', bar: 10}
}
});
```
## Contributing
Please feel free to fork and add your own helpers !
## History
v0.0.1 Vue.log method