Fixed bug where dist folder is created before placeholder page

If dist folder did not already exist, the folder is created prior to creation of the placeholder page. Without this, the dapp files are never built.
This commit is contained in:
Eric Mastro 2018-05-23 13:35:18 +10:00
parent 0ef0342fe3
commit ab1113fc31

View File

@ -31,6 +31,7 @@ class Pipeline {
async.waterfall([ async.waterfall([
function createPlaceholderPage(next){ function createPlaceholderPage(next){
self.events.request('embark-building-placeholder', (html) => { self.events.request('embark-building-placeholder', (html) => {
fs.mkdirpSync(self.buildDir); // create dist/ folder if not already exists
fs.writeFile(self.buildDir + 'index.html', html, next); fs.writeFile(self.buildDir + 'index.html', html, next);
}); });
}, },