grapesjs-tailwind-iconify
Version:
Enhanced fork of grapesjs-tailwind with Custom Components Manager and Iconify integration
30 lines (25 loc) • 633 B
JavaScript
/**
* Module dependencies.
*/
import Compressed from 'css/lib/stringify/compress';
import Identity from 'css/lib/stringify/identity';
/**
* Stringfy the given AST `node`.
*
* Options:
*
* - `compress` space-optimized output
* - `sourcemap` return an object with `.code` and `.map`
*
* @param {Object} node
* @param {Object} [options]
* @return {String}
* @api public
*/
export default function (node, options) {
options = options || {};
const compiler = options.compress
? new Compressed(options)
: new Identity(options);
return compiler.compile(node);
};