UNPKG

@shopify/theme-language-server-common

Version:

<h1 align="center" style="position: relative;" > <br> <img src="https://github.com/Shopify/theme-check-vscode/blob/main/images/shopify_glyph.png?raw=true" alt="logo" width="141" height="160"> <br> Theme Language Server </h1>

9 lines (6 loc) 459 B
import { path } from '@shopify/theme-check-common'; export const snippetName = (uri: string) => path.basename(uri, '.liquid'); export const isSnippet = (uri: string) => /\bsnippets(\\|\/)[^\\\/]*\.liquid/.test(uri); // asset urls have their `.liquid`` removed (if present) and require the other extension */ export const assetName = (uri: string) => path.basename(uri, '.liquid'); export const isAsset = (uri: string) => /\bassets(\\|\/)[^\\\/]/.test(uri);