diff --git a/cmd/cmd_controller.js b/cmd/cmd_controller.js index ba337313..65378c2a 100644 --- a/cmd/cmd_controller.js +++ b/cmd/cmd_controller.js @@ -454,6 +454,11 @@ class EmbarkController { async.waterfall([ function initEngine(callback) { engine.init({}, () => { + if (engine.config.embarkConfig.config.storage === false || engine.config.storageConfig.enabled === false) { + engine.logger.error(__('Storage configuration is disabled in embark.json. Please provide a storage file before uploading')); + engine.logger.info(__('You can find an example here: %s', 'https://github.com/embark-framework/embark/blob/master/templates/demo/config/storage.js'.underline)); + process.exit(); + } platform = engine.config.storageConfig.upload.provider; callback(); }); diff --git a/lib/pipeline/pipeline.js b/lib/pipeline/pipeline.js index cbb27c40..a1368d1b 100644 --- a/lib/pipeline/pipeline.js +++ b/lib/pipeline/pipeline.js @@ -85,11 +85,14 @@ class Pipeline { }, function runWebpack(next) { self.logger.info(__(`running webpack with '${self.webpackConfigName}' config...`)); - Object.keys(self.assetFiles) - .filter(key => key.match(/\.js?$/)) - .forEach(key => { - self.logger.info(__("writing file") + " " + (utils.joinPath(self.buildDir, key)).bold.dim); - }); + const assets = Object.keys(self.assetFiles) + .filter(key => key.match(/\.js?$/)); + assets.forEach(key => { + self.logger.info(__("writing file") + " " + (utils.joinPath(self.buildDir, key)).bold.dim); + }); + if (!assets || !assets.length) { + return next(); + } let built = false; const webpackProcess = new ProcessLauncher({ modulePath: utils.joinPath(__dirname, 'webpackProcess.js'),