mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-03 09:24:25 +00:00
skip webpack if no js files
This commit is contained in:
parent
c92f6f8865
commit
047286b46d
@ -454,6 +454,11 @@ class EmbarkController {
|
|||||||
async.waterfall([
|
async.waterfall([
|
||||||
function initEngine(callback) {
|
function initEngine(callback) {
|
||||||
engine.init({}, () => {
|
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;
|
platform = engine.config.storageConfig.upload.provider;
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
@ -85,11 +85,14 @@ class Pipeline {
|
|||||||
},
|
},
|
||||||
function runWebpack(next) {
|
function runWebpack(next) {
|
||||||
self.logger.info(__(`running webpack with '${self.webpackConfigName}' config...`));
|
self.logger.info(__(`running webpack with '${self.webpackConfigName}' config...`));
|
||||||
Object.keys(self.assetFiles)
|
const assets = Object.keys(self.assetFiles)
|
||||||
.filter(key => key.match(/\.js?$/))
|
.filter(key => key.match(/\.js?$/));
|
||||||
.forEach(key => {
|
assets.forEach(key => {
|
||||||
self.logger.info(__("writing file") + " " + (utils.joinPath(self.buildDir, key)).bold.dim);
|
self.logger.info(__("writing file") + " " + (utils.joinPath(self.buildDir, key)).bold.dim);
|
||||||
});
|
});
|
||||||
|
if (!assets || !assets.length) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
let built = false;
|
let built = false;
|
||||||
const webpackProcess = new ProcessLauncher({
|
const webpackProcess = new ProcessLauncher({
|
||||||
modulePath: utils.joinPath(__dirname, 'webpackProcess.js'),
|
modulePath: utils.joinPath(__dirname, 'webpackProcess.js'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user