UNPKG

ez-shp-storefront

Version:

A helper function collection for Shopify storefront.

20 lines (19 loc) 877 B
import { EventBus } from './utils/eventBus'; import { Fetch } from './utils/fetch'; import { Checkout } from './utils/checkout'; import { Cart } from './utils/cart'; import { MoneyFormatter } from './utils/moneyFormatter'; import { Dom } from './utils/dom'; import { Logger } from './utils/logger'; export { inIframe } from './utils/iframe'; export { moveByElementQueries, moveByElements, Positions } from './utils/move'; export { getElementByContent } from './utils/getElementByContent'; export const eventBus = EventBus.getInstance(); export const cart = Cart.getInstance(); export const moneyFormatter = MoneyFormatter.getInstance(); export const checkout = Checkout.getInstance().setEventBus(eventBus); export const dom = Dom.getInstance(); export const logger = Logger.getInstance(); export function listenOnCartChange() { Fetch.getInstance().setEventBus(eventBus); }