Skip to content

Commit

Permalink
[xprototype#4/feature] Add $log as a helper to console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
wilcorrea committed Mar 28, 2019
1 parent e850648 commit 258068f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function (context) {
boot: [
'browse',
'components',
'dev',
'development',
'i18n',
'message',
'service',
Expand Down
8 changes: 8 additions & 0 deletions src/boot/dev.js → src/boot/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ export default ({ Vue }) => {
return process.env.app.APP_DEV
}
})

/**
*/
Object.defineProperty(Vue.prototype, '$log', {
get () {
return process.env.NODE_ENV !== 'production' ? console.log : () => undefined
}
})
}

0 comments on commit 258068f

Please sign in to comment.