From 8c8dde0a7d038f3926951df980daec082a870c80 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 29 Jun 2018 03:24:58 -0600 Subject: [PATCH] lighten the load --- glx.js => index.js | 15 +++++++-------- package.json | 7 +++++-- 2 files changed, 12 insertions(+), 10 deletions(-) rename glx.js => index.js (91%) diff --git a/glx.js b/index.js similarity index 91% rename from glx.js rename to index.js index dc60e7d..c3b27be 100644 --- a/glx.js +++ b/index.js @@ -1,5 +1,12 @@ 'use strict'; +var PromiseA; +try { + PromiseA = require('bluebird'); +} catch(e) { + PromiseA = global.Promise; +} + // opts.approveDomains(options, certs, cb) module.exports.create = function (opts) { // accept all defaults for greenlock.challenges, greenlock.store, greenlock.middleware @@ -11,14 +18,6 @@ module.exports.create = function (opts) { }; opts.listen = function (plainPort, port) { - var PromiseA; - try { - PromiseA = require('bluebird'); - } catch(e) { - console.warn("Package 'bluebird' not installed. Using global.Promise instead"); - console.warn("(want bluebird instead? npm install --save bluebird)"); - PromiseA = global.Promise; - } var promises = []; var plainPorts = plainPort; var ports = port; diff --git a/package.json b/package.json index 976dc8d..6f68cb5 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "greenlock-express", - "version": "2.3.0", + "version": "2.3.1", "description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.", - "main": "glx.js", + "main": "index.js", "homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js", "directories": { "example": "examples" @@ -14,6 +14,9 @@ "le-store-certbot": "^2.1.0", "redirect-https": "^1.1.5" }, + "files": [ + , "lib" + ], "optionalDependencies": { "spdy": "^3.4.7" },