UNPKG

@master/css-server

Version:

Generate Master CSS text from markup on the server

14 lines (13 loc) 381 B
import MasterCSS, { Config } from '@master/css'; import { HTMLElement } from 'node-html-parser'; /** * Renders the page-required and sorted CSS text from HTML and injected it back into HTML * @param html * @param config */ export default function render(html: string, config?: Config): { html: string; root: HTMLElement; css?: MasterCSS; classes?: string[]; };