@dscodotco/theme-cli
Version:
A CLI tool for developing Shopify themes
32 lines (31 loc) • 909 B
TypeScript
import { ShopifyCredentials } from "./theme-manager.js";
import Shopify from "shopify-api-node";
export interface RendererOptions {
credentials: ShopifyCredentials;
themeId: number;
shopify: Shopify;
}
/**
* A service for rendering Shopify Liquid templates
* using Shopify's own rendering engine via the Admin API
*/
export declare class ShopifyRenderer {
private credentials;
private themeId;
private shopify;
private baseUrl;
/**
* Creates a new ShopifyRenderer instance
* @param options Renderer configuration options
*/
constructor(options: RendererOptions);
/**
* Renders a template by uploading it to Shopify and fetching the rendered content
*/
renderTemplate(content: string): Promise<string>;
/**
* Gets the URL for previewing the current template
* @returns The preview URL
*/
getPreviewUrl(): string;
}