UNPKG

weapp-tailwindcss

Version:

把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!

32 lines (31 loc) 762 B
require("@weapp-tailwindcss/shared"); //#region src/utils/index.ts function classifyEntry(filename, options) { if (options.cssMatcher(filename)) return "css"; if (options.htmlMatcher(filename)) return "html"; if (options.jsMatcher(filename) || options.wxsMatcher(filename)) return "js"; return "other"; } function createEmptyGroups() { return { css: [], html: [], js: [], other: [] }; } function getGroupedEntries(entries, options) { const groups = createEmptyGroups(); for (const entry of entries) { const [filename] = entry; groups[classifyEntry(filename, options)].push(entry); } return groups; } //#endregion Object.defineProperty(exports, "getGroupedEntries", { enumerable: true, get: function() { return getGroupedEntries; } });