mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-10-31 14:34:00 +00:00 
			
		
		
		
	debug fs steps
This commit is contained in:
		
							parent
							
								
									2fa014445f
								
							
						
					
					
						commit
						bfc307efbe
					
				| @ -3,10 +3,16 @@ import { existsSync, copyFile } from "fs"; | |||||||
| 
 | 
 | ||||||
| export default function checkAndCopyConfig(config) { | export default function checkAndCopyConfig(config) { | ||||||
|   const configYaml = join(process.cwd(), "config", config); |   const configYaml = join(process.cwd(), "config", config); | ||||||
|  |   console.log("config:", configYaml); | ||||||
|   if (!existsSync(configYaml)) { |   if (!existsSync(configYaml)) { | ||||||
|  |     console.log("does not exist"); | ||||||
|     const configSkeleton = join(process.cwd(), "src", "skeleton", config); |     const configSkeleton = join(process.cwd(), "src", "skeleton", config); | ||||||
|  |     console.log("skeleton", configSkeleton); | ||||||
|     copyFile(configSkeleton, configYaml, (err) => { |     copyFile(configSkeleton, configYaml, (err) => { | ||||||
|       if (err) throw err; |       if (err) { | ||||||
|  |         console.log("error copying config", err); | ||||||
|  |         throw err; | ||||||
|  |       } | ||||||
|       console.info("%s was copied to the config folder", config); |       console.info("%s was copied to the config folder", config); | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ben Phelps
						Ben Phelps