MCPcopy Create free account
hub / github.com/craftreactnative/ui / copyThemes

Function copyThemes

cli/src/utils/component-manager.ts:143–156  ·  view source on GitHub ↗
(targetPath: string)

Source from the content-addressed store, hash-verified

141 * Copies all theme files to target location
142 */
143export 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

Callers 1

initCommandFunction · 0.90

Calls 1

ensureSourcePathsFunction · 0.85

Tested by

no test coverage detected