mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-30 18:40:08 +00:00 
			
		
		
		
	refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									703f053895
								
							
						
					
					
						commit
						c92a5e40af
					
				| @ -19,26 +19,23 @@ glob('bootstrap/**/*.@(tpl|md|css|html)') | |||||||
| 			.replace('bootstrap/', '') | 			.replace('bootstrap/', '') | ||||||
| 			.replace(/\.(json|txt|md|css|html)/, '') | 			.replace(/\.(json|txt|md|css|html)/, '') | ||||||
| 
 | 
 | ||||||
| 		if(p) | 		p | ||||||
|  | 			&& console.log('Found:', p) | ||||||
| 
 | 
 | ||||||
| 		console.log('Found:', p) |  | ||||||
| 		bootstrap[p] = { | 		bootstrap[p] = { | ||||||
| 			text: fs.readFileSync(path).toString(), | 			text: fs.readFileSync(path).toString(), | ||||||
| 		} | 		} }) | ||||||
| 	}) |  | ||||||
| 	.on('end', function(){ | 	.on('end', function(){ | ||||||
| 		if(fs.existsSync('README.md')){ | 		if(fs.existsSync('README.md')){ | ||||||
| 			console.log('Setting:', 'About') | 			console.log('Setting:', 'About') | ||||||
| 			bootstrap['Doc/About'] = { | 			bootstrap['Doc/About'] = { | ||||||
| 				text: fs.readFileSync('README.md').toString(), | 				text: fs.readFileSync('README.md').toString(), | ||||||
| 			} | 			} } | ||||||
| 		} |  | ||||||
| 		if(!bootstrap.WikiHome){ | 		if(!bootstrap.WikiHome){ | ||||||
| 			console.log('Setting:', 'WikiHome') | 			console.log('Setting:', 'WikiHome') | ||||||
| 			bootstrap.WikiHome = { | 			bootstrap.WikiHome = { | ||||||
| 				text: '@include(Doc/About)' | 				text: '@include(Doc/About)' | ||||||
| 			} | 			} } | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
| 		var txt = '// This file is generated automatically, ' | 		var txt = '// This file is generated automatically, ' | ||||||
| 			+'all changes made here will be lost.' | 			+'all changes made here will be lost.' | ||||||
| @ -46,8 +43,7 @@ glob('bootstrap/**/*.@(tpl|md|css|html)') | |||||||
| 			+'var Bootstrap = ' + JSON.stringify(bootstrap) | 			+'var Bootstrap = ' + JSON.stringify(bootstrap) | ||||||
| 
 | 
 | ||||||
| 		console.log('Writing:', 'bootstrap.js') | 		console.log('Writing:', 'bootstrap.js') | ||||||
| 		fs.writeFileSync('bootstrap.js', txt) | 		fs.writeFileSync('bootstrap.js', txt) }) | ||||||
| 	}) |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user