Skip to content

Instantly share code, notes, and snippets.

@daliborgogic
Last active December 17, 2017 18:43
Show Gist options
  • Save daliborgogic/6dd26f0392be5b128f5e2f20bd140653 to your computer and use it in GitHub Desktop.
Save daliborgogic/6dd26f0392be5b128f5e2f20bd140653 to your computer and use it in GitHub Desktop.
Debug *.vue
<script>
import debug from 'debug'
const a = debug('worker:a')
const b = debug('worker:b')
export default {
mounted () {
if (process.env.NODE_ENV !== 'production') {
window.localStorage.debug = 'worker:*'
}
// Demo time!
setInterval(() => {
a('doing some work')
}, 1000)
setInterval(() => {
b('doing some work')
}, 1200)
}
}
</script>
@daliborgogic
Copy link
Author

debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment