snowpack-plugin-stylus
Version:
Use the Stylus compiler to build .styl files from source
21 lines (20 loc) • 641 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.render = void 0;
const tslib_1 = require("tslib");
const stylus_1 = tslib_1.__importDefault(require("stylus"));
function render(content, options) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
stylus_1.default.render(content, options, (err, result) => {
if (err) {
reject(err);
}
else {
resolve(result);
}
});
});
});
}
exports.render = render;