(targetPath: string)
| 141 | * Copies all theme files to target location |
| 142 | */ |
| 143 | export async function copyThemes(targetPath: string): Promise<void> { |
| 144 | const { themesPath } = await ensureSourcePaths(); |
| 145 | const destPath = path.join(targetPath, "craftrn-ui", "themes"); |
| 146 | |
| 147 | if (!(await fs.pathExists(themesPath))) { |
| 148 | throw new Error( |
| 149 | `Themes source not found at: ${themesPath}\n` + |
| 150 | `Current working directory: ${process.cwd()}` |
| 151 | ); |
| 152 | } |
| 153 | |
| 154 | await fs.ensureDir(path.dirname(destPath)); |
| 155 | await fs.copy(themesPath, destPath); |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * Returns installation and setup instructions for the user |
no test coverage detected