[build] add missing promise.all

This commit is contained in:
Pooya Parsa 2017-05-18 13:17:39 +04:30
parent a70fc016e4
commit 5b8cb0f464

View File

@ -259,7 +259,7 @@ async function generateRoutesAndFiles () {
})) }))
// Interpret and move template files to .nuxt/ // Interpret and move template files to .nuxt/
return templatesFiles.map(async ({src, dst, options, custom}) => { return Promise.all(templatesFiles.map(async ({src, dst, options, custom}) => {
// Add template to watchers // Add template to watchers
this.options.build.watch.push(src) this.options.build.watch.push(src)
// Render template to dst // Render template to dst
@ -284,7 +284,7 @@ async function generateRoutesAndFiles () {
// Fix webpack loop (https://github.com/webpack/watchpack/issues/25#issuecomment-287789288) // Fix webpack loop (https://github.com/webpack/watchpack/issues/25#issuecomment-287789288)
const dateFS = Date.now() / 1000 - 30 const dateFS = Date.now() / 1000 - 30
return utimes(path, dateFS, dateFS) return utimes(path, dateFS, dateFS)
}) }))
} }
function createRoutes (files, srcDir) { function createRoutes (files, srcDir) {