weapp-tailwindcss
Version:
把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!
44 lines (43 loc) • 1.2 kB
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
let _weapp_core_escape = require("@weapp-core/escape");
//#region src/utils/object.ts
function definedEntries(value) {
return Object.entries(value).filter(([, item]) => item !== void 0);
}
function omitUndefined(value) {
return Object.fromEntries(definedEntries(value));
}
//#endregion
//#region src/wxml/shared.ts
const NEWLINE_RE = /[\n\r]+/g;
function replaceWxml(original, options = {
keepEOL: false,
escapeMap: _weapp_core_escape.MappingChars2String
}) {
const { keepEOL, escapeMap, ignoreHead } = options;
let res = original;
if (!keepEOL) res = res.replaceAll(NEWLINE_RE, "");
res = (0, _weapp_core_escape.escape)(res, omitUndefined({
map: escapeMap,
ignoreHead
}));
return res;
}
//#endregion
//#region src/escape.ts
const weappTwIgnore = String.raw;
//#endregion
exports.escape = replaceWxml;
Object.defineProperty(exports, "isAllowedClassName", {
enumerable: true,
get: function() {
return _weapp_core_escape.isAllowedClassName;
}
});
Object.defineProperty(exports, "unescape", {
enumerable: true,
get: function() {
return _weapp_core_escape.unescape;
}
});
exports.weappTwIgnore = weappTwIgnore;