Skip to content

Commit

Permalink
fix: Only show explorer context menu in miyagi projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mvsde committed May 14, 2024
1 parent 00bae4f commit 7de4339
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import { getProjectList, reloadSchemas } from './lib/projects'
import { setupStorage } from './lib/storage'
import { createFileSystemWatcher } from './utils/create-file-system-watcher'

const contextHasMiyagi = new ContextKey('miyagi.hasMiyagi')
const contextCanLint = new ContextKey('miyagi.canLint')
const contextCanNewComponent = new ContextKey('miyagi.canNewComponent')
const contextCanGenerateMocks = new ContextKey('miyagi.canGenerateMocks')

async function reload() {
const projectList = await getProjectList({ refresh: true })
contextHasMiyagi.set(projectList.length > 0)

const canLint = projectList.every((project) => semver.gte(project.version, '3.3.2'))
contextCanLint.set(canLint)
Expand Down

0 comments on commit 7de4339

Please # to comment.