Merge pull request #451 from embark-framework/bug_fix/create-dist-folder-before-placeholder-page

Fixed bug where dist folder is created before placeholder page
This commit is contained in:
Iuri Matias 2018-05-23 05:28:31 -04:00 committed by GitHub
commit 204bcb8cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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);
}); });
}, },