pipeline fires placeholder event only after first build

This commit is contained in:
Michael Bradley, Jr 2018-08-31 15:02:42 -05:00
parent de0034c1fc
commit 03c51fba46
1 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class Pipeline {
this.plugins = options.plugins; this.plugins = options.plugins;
this.webpackConfigName = options.webpackConfigName; this.webpackConfigName = options.webpackConfigName;
this.pipelinePlugins = this.plugins.getPluginsFor('pipeline'); this.pipelinePlugins = this.plugins.getPluginsFor('pipeline');
this.isFirstBuild = true;
} }
build(abi, contractsJSON, path, callback) { build(abi, contractsJSON, path, callback) {
@ -28,6 +29,11 @@ class Pipeline {
async.waterfall([ async.waterfall([
function createPlaceholderPage(next){ function createPlaceholderPage(next){
if (!self.isFirstBuild) {
return self.events.request('embark-building-placeholder', next);
}
self.isFirstBuild = false;
next();
}, },
function buildTheContracts(next) { function buildTheContracts(next) {
self.buildContracts(next); self.buildContracts(next);