mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 02:50:08 +00:00 
			
		
		
		
	Merge branch 'master' into gen2
This commit is contained in:
		
						commit
						211447af2c
					
				
							
								
								
									
										18
									
								
								scripts/bootstrap.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								scripts/bootstrap.js
									
									
									
									
										vendored
									
									
								
							| @ -12,6 +12,15 @@ var glob = require('glob') | |||||||
| 
 | 
 | ||||||
| var bootstrap = {} | var bootstrap = {} | ||||||
| 
 | 
 | ||||||
|  | var BOOTSTRAP_TEMPLATE =  | ||||||
|  | `// This file is generated automatically, all changes made here will be lost.
 | ||||||
|  | 
 | ||||||
|  | var Bootstrap = $BOOTSTRAP  | ||||||
|  | 
 | ||||||
|  | typeof(module) != "undefined" | ||||||
|  | 	&& (module.exports = Bootstrap)` | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| // XXX add support for json...
 | // XXX add support for json...
 | ||||||
| glob('bootstrap/**/*.@(tpl|md|css|html)') | glob('bootstrap/**/*.@(tpl|md|css|html)') | ||||||
| 	.on('match', function(path){ | 	.on('match', function(path){ | ||||||
| @ -43,13 +52,8 @@ glob('bootstrap/**/*.@(tpl|md|css|html)') | |||||||
| 					}<!-- @filter(text) -->`,
 | 					}<!-- @filter(text) -->`,
 | ||||||
| 			} } | 			} } | ||||||
| 
 | 
 | ||||||
| 		var txt = '// This file is generated automatically, ' | 		var txt = BOOTSTRAP_TEMPLATE | ||||||
| 			+'all changes made here will be lost.' | 			.replace(/\$BOOTSTRAP/g, JSON.stringify(bootstrap)) | ||||||
| 			+'\n\n' |  | ||||||
| 			+'var Bootstrap = ' + JSON.stringify(bootstrap) |  | ||||||
| 			+'\n\n' |  | ||||||
| 			+'typeof(module) != "undefined" \n' |  | ||||||
| 			+'	&& (module.exports = 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