Commit afa4afb 1 parent ab0efb3 commit afa4afb Copy full SHA for afa4afb
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,14 @@ export async function CreateFileFromTemplate(
36
36
}
37
37
38
38
if ( ! output || ( component && ( ! output . config || ! output . config . category ) ) ) {
39
- throw new Error ( 'Invalid template.' ) ;
39
+ throw new Error ( 'The template is invalid. Please create a valid template structure .' ) ;
40
40
}
41
41
42
42
const directoryForOutput = component ? config ?. locations [ output . config ! . category ] : null ;
43
43
const targetPath = component ? target . replace ( '%L%' , directoryForOutput ) : target ;
44
44
45
45
if ( await fileExists ( targetPath ) ) {
46
- throw new Error ( 'Component already exists' ) ;
46
+ throw new Error ( 'A component with the provided name already exists. Please provide a unique name. ' ) ;
47
47
}
48
48
49
49
await writeFileRecursive ( targetPath , output . templateContent ) ;
You can’t perform that action at this time.
0 commit comments