Skip to content

Commit

Permalink
feat: detect more editors
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Feb 19, 2024
1 parent c6af273 commit 5c9960a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/env.ts
@@ -1,8 +1,13 @@
import process from 'node:process'
import { isPackageExists } from 'local-pkg'

export const isInEditor =
(process.env.VSCODE_PID || process.env.JETBRAINS_IDE) && !process.env.CI
export const isInEditor = !!(
(process.env.VSCODE_PID ||
process.env.VSCODE_CWD ||
process.env.JETBRAINS_IDE ||
process.env.VIM) &&
!process.env.CI
)
export const hasTypeScript = isPackageExists('typescript')
export const hasVue =
isPackageExists('vue') ||
Expand Down

0 comments on commit 5c9960a

Please sign in to comment.