File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const fs = require ( 'node:fs' )
12const { switchVersion, loadModule } = require ( './utils' )
23
34const Vue = loadModule ( 'vue' )
45
5- if ( ! Vue || typeof Vue . version !== 'string' )
6+ if ( fs . existsSync ( '.local' ) )
7+ console . log ( 'Currently, it is the local development environment, not doing anything.' )
8+
9+ else if ( ! Vue || typeof Vue . version !== 'string' )
610 console . warn ( '[v-code-diff] Vue is not found. Please run "npm install vue" to install.' )
711
812else if ( Vue . version . startsWith ( '2.7.' ) )
@@ -14,5 +18,4 @@ else if (Vue.version.startsWith('2.'))
1418else if ( Vue . version . startsWith ( '3.' ) )
1519 switchVersion ( '3' )
1620
17- else
18- console . warn ( `[v-code-diff] Vue version v${ Vue . version } is not suppported.` )
21+ else console . warn ( `[v-code-diff] Vue version v${ Vue . version } is not suppported.` )
You can’t perform that action at this time.
0 commit comments