@usedetach/core
v0.2.1
Published
Framework-free Detach content delivery client — web-standard fetch, preview tokens, caching strategies.
Readme
@usedetach/core
The framework-free delivery client for Detach, a visual headless CMS for Shopify storefronts. Production rendering depends on this client and your own components — never on the editor.
Web-standard fetch/Request/Response only, so it runs on Node, Cloudflare, Deno and the browser
alike.
npm install @usedetach/coreimport { createClient } from "@usedetach/core";
export const cms = createClient({
baseUrl: process.env.CMS_BASE_URL!,
workspace: process.env.CMS_WORKSPACE!,
deliveryKey: process.env.CMS_DELIVERY_KEY,
});Also here: createShopifyDeliveryClient (read published content from metaobjects mirrored to
Shopify's CDN, while preview still reads from the CMS), the CacheDefault/CacheShort/CacheLong/
CacheCustom strategies, cacheTags, preview-token helpers and normalizePage.
Framework integrations build on this: @usedetach/next and
@usedetach/hydrogen.
