skip webpack if no js files
This commit is contained in:
parent
c92f6f8865
commit
047286b46d
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -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 => {
|
||||
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'),
|
||||
|
|
Loading…
Reference in New Issue