flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
1 lines • 1.03 kB
Source Map (JSON)
{"version":3,"file":"get-class-list.cjs","sources":["../../../src/cli/utils/get-class-list.ts"],"sourcesContent":["import fs from \"fs/promises\";\nimport { classListFilePath } from \"../consts\";\n\n/**\n * Reads the class list file and returns its content as an array of strings.\n *\n * This function attempts to read the file specified by `classListFilePath`, parse its content as JSON,\n * and return the parsed array. If the file cannot be read or parsed, an empty array is returned.\n *\n * @returns {Promise<string[]>} A promise that resolves to an array of strings representing the class list.\n */\nexport async function getClassList(): Promise<string[]> {\n try {\n return JSON.parse(await fs.readFile(classListFilePath, \"utf-8\")) ?? [];\n } catch {\n return [];\n }\n}\n"],"names":["classListFilePath"],"mappings":";;;;;AAGO,eAAe,YAAY,GAAG;AACrC,EAAE,IAAI;AACN,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAACA,wBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE;AAC1E,GAAG,CAAC,MAAM;AACV,IAAI,OAAO,EAAE;AACb;AACA;;;;"}