import * as path from 'path' ; import { ExtensionContext , Uri } from "vscode" ; let EXTENSION_CONTEXT = null ; export function setAssetContext ( context ) { EXTENSION_CONTEXT = context ; } export function assetPath ( relativePath ) { if ( EXTENSION_CONTEXT ) { return EXTENSION_CONTEXT . asAbsolutePath ( relativePath ) ; } const absolutePath = path . join ( __dirname , '..' , relativePath ) ; return absolutePath ; } export function assetUri ( relativePath ) { return Uri . file ( assetPath ( relativePath ) ) ; }