1
- import inspect from 'util-inspect'
2
-
3
- console . log = ( function ( log , inspect ) {
4
- return function ( ) {
5
- return log . apply (
6
- this ,
7
- Array . prototype . map . call ( arguments , function ( arg ) {
8
- return inspect ( arg , { depth : 1 , colors : true } )
9
- } )
10
- )
11
- }
12
- } ) ( console . log , inspect )
13
-
14
- console . keys = function ( object ) {
15
- console . log ( Object . keys ( object ) )
16
- }
17
-
18
1
// This is required because some of the third party plugins rely on this
19
2
// and cause errors since there is no process variable in {N}.
20
3
global . process = global . process || { }
21
4
global . process . env = global . process . env || { }
22
5
6
+ import inspect from 'util-inspect'
23
7
import Vue from './runtime/index'
24
8
import ModalPlugin from './plugins/modal-plugin'
25
9
import NavigatorPlugin from './plugins/navigator-plugin'
@@ -31,4 +15,19 @@ Vue.use(NavigatorPlugin)
31
15
// Vue.use(DecoderPlugin)
32
16
Vue . use ( RouterPlugin )
33
17
18
+ console . log = ( function ( log , inspect , Vue ) {
19
+ return function ( ) {
20
+ return log . apply (
21
+ this ,
22
+ Array . prototype . map . call ( arguments , function ( arg ) {
23
+ return inspect ( arg , { depth : 1 , colors : Vue . config . debug } )
24
+ } )
25
+ )
26
+ }
27
+ } ) ( console . log , inspect , Vue )
28
+
29
4B96
+ console . keys = function ( object ) {
30
+ console . log ( Object . keys ( object ) )
31
+ }
32
+
34
33
export default Vue
0 commit comments