flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
1 lines • 1.14 kB
Source Map (JSON)
{"version":3,"file":"normalize-path.cjs","sources":["../../../src/cli/utils/normalize-path.ts"],"sourcesContent":["import path from \"path\";\n\n/**\n * Normalizes a path for use in import statements, ensuring forward slashes are used\n * regardless of the operating system.\n *\n * @param importPath - The path to normalize\n * @returns The normalized path with forward slashes\n */\nexport function normalizeImportPath(importPath: string): string {\n return importPath.replace(/\\\\/g, \"/\");\n}\n\n/**\n * Joins path segments and normalizes the result to use forward slashes.\n * This is useful for paths that need to be used in import statements or URLs.\n *\n * @param segments - Path segments to join\n * @returns The normalized path with forward slashes\n */\nexport function joinNormalizedPath(...segments: string[]): string {\n return normalizeImportPath(path.join(...segments));\n}\n"],"names":[],"mappings":";;;;AAEO,SAAS,mBAAmB,CAAC,UAAU,EAAE;AAChD,EAAE,OAAO,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AACvC;AACO,SAAS,kBAAkB,CAAC,GAAG,QAAQ,EAAE;AAChD,EAAE,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;AACpD;;;;;"}