added relative path in build folder creation
This commit is contained in:
		
							parent
							
								
									90abf84693
								
							
						
					
					
						commit
						9ba3032a92
					
				
							
								
								
									
										6
									
								
								build.js
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								build.js
									
									
									
									
									
								
							| @ -47,14 +47,14 @@ files.forEach( file => { | |||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| fs.cp('./src/styles','./build/styles', { recursive: true }, (err) => { | fs.cp('./src/styles','./build/styles', { recursive: true }, (err) => { | ||||||
|  	if (err) throw err; | 	if (err) throw err; | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| function ensureDirectoryExists(filePath) { | function ensureDirectoryExists(filePath) { | ||||||
|     var dirname = filePath.split('/').slice(0,-1).join('/'); |     var dirname = filePath.split('/').slice(0,-1).join('/'); | ||||||
|     if (fs.existsSync(dirname)) { |     if (fs.existsSync("./" + dirname)) { | ||||||
| 		return true; | 	return true; | ||||||
|     } |     } | ||||||
|     ensureDirectoryExists(dirname); |     ensureDirectoryExists(dirname); | ||||||
|     fs.mkdirSync(dirname); |     fs.mkdirSync(dirname); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user