Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8f98ad7

Browse files
committed
feat: allow silencing the console ouput
closesnativescript-vue#99
1 parent632bd80 commit8f98ad7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎platform/nativescript/util/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import{makeMap}from'shared/util'
1+
import{makeMap,once}from'shared/util'
22
import{isKnownView,getViewMeta}from'../element-registry'
3+
importVuefrom'../framework'
34

45
exportconstisReservedTag=makeMap('template',true)
56

@@ -34,7 +35,17 @@ export function query(el, renderer, document) {
3435
exportconstVUE_VERSION=process.env.VUE_VERSION
3536
exportconstNS_VUE_VERSION=process.env.NS_VUE_VERSION
3637

38+
constinfoTrace=once(()=>{
39+
console.log(
40+
`NativeScript-Vue has "Vue.config.silent" set to true, to see output logs set it to false.`
41+
)
42+
})
43+
3744
exportfunctiontrace(message){
45+
if(Vue.config.silent){
46+
returninfoTrace()
47+
}
48+
3849
console.log(
3950
`{NSVue (Vue:${VUE_VERSION} | NSVue:${NS_VUE_VERSION})} ->${message}`
4051
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp