mirror of
				https://github.com/therootcompany/greenlock.js.git
				synced 2024-11-16 17:29:00 +00:00 
			
		
		
		
	
		
			
	
	
		
			22 lines
		
	
	
		
			528 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			22 lines
		
	
	
		
			528 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|  | 'use strict'; | ||
|  | 
 | ||
|  | function requireBluebird() { | ||
|  |   try { | ||
|  |     return require('bluebird'); | ||
|  |   } catch(e) { | ||
|  |     console.error(""); | ||
|  |     console.error("DON'T PANIC. You're running an old version of node with incomplete Promise support."); | ||
|  |     console.error("EASY FIX: `npm install --save bluebird`"); | ||
|  |     console.error(""); | ||
|  |     throw e; | ||
|  |   } | ||
|  | } | ||
|  | 
 | ||
|  | if ('undefined' === typeof Promise) { | ||
|  |   global.Promise = requireBluebird(); | ||
|  | } | ||
|  | 
 | ||
|  | if ('function' !== typeof require('util').promisify) { | ||
|  |   require('util').promisify = requireBluebird().promisify; | ||
|  | } |