From e23c26f56508740e6a9e36b61fc8512b8d010d47 Mon Sep 17 00:00:00 2001 From: Enrico Marino Date: Thu, 25 May 2017 10:37:08 +0200 Subject: [PATCH] Promisify init --- src/core/components/init.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/components/init.js b/src/core/components/init.js index 594b432c00..0e796ea58f 100644 --- a/src/core/components/init.js +++ b/src/core/components/init.js @@ -4,11 +4,12 @@ const peerId = require('peer-id') const waterfall = require('async/waterfall') const parallel = require('async/parallel') const isNode = require('detect-node') +const promisify = require('promisify-es6') const addDefaultAssets = require('./init-assets') module.exports = function init (self) { - return (opts, callback) => { + return promisify((opts, callback) => { if (typeof opts === 'function') { callback = opts opts = {} @@ -104,5 +105,5 @@ module.exports = function init (self) { }) } ], done) - } + }) }