@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 812 B
Source Map (JSON)
{"version":3,"file":"lucid-directory.mjs","names":["constants"],"sources":["../../../src/utils/helpers/lucid-directory.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { mkdir } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport constants from \"../../constants/constants.js\";\n\n/**\n * Ensures the .lucid directory exists in the CWD\n */\n\nexport const ensureLucidDirectoryExists = async () => {\n\tconst cwd = process.cwd();\n\tconst lucidDir = join(cwd, constants.directories.lucid);\n\n\tif (!existsSync(lucidDir)) {\n\t\tawait mkdir(lucidDir, { recursive: true });\n\t}\n\n\treturn lucidDir;\n};\n"],"mappings":"4JASA,MAAa,EAA6B,SAAY,CAErD,IAAM,EAAW,EADL,QAAQ,IACI,EAAGA,EAAU,YAAY,KAAK,EAMtD,OAJK,EAAW,CAAQ,GACvB,MAAM,EAAM,EAAU,CAAE,UAAW,EAAK,CAAC,EAGnC,CACR"}