change timing of "writing file" messages

This commit is contained in:
Michael Bradley, Jr 2018-08-16 15:59:41 -05:00
parent f654c0a013
commit 878186660b
1 changed files with 6 additions and 2 deletions

View File

@ -113,6 +113,11 @@ class Pipeline {
function assetFileWrite(next) {
async.eachOf(self.assetFiles, function (files, targetFile, cb) {
async.map(files,
const isDir = targetFile.slice(-1) === '/' || targetFile.indexOf('.') === -1;
// if it's not a directory
if (!isDir) {
self.logger.info(__("writing file") + " " + (self.buildDir + targetFile).bold.dim);
}
function (file, fileCb) {
self.logger.trace("reading " + file.filename);
@ -156,7 +161,7 @@ class Pipeline {
fs.mkdirpSync(self.buildDir + dir);
// if it's a directory
if (targetFile.slice(-1) === '/' || targetFile.indexOf('.') === -1) {
if (isDir) {
let targetDir = targetFile;
if (targetDir.slice(-1) !== '/') {
@ -179,7 +184,6 @@ class Pipeline {
return file.content;
}).join("\n");
self.logger.info(__("writing file") + " " + (self.buildDir + targetFile).bold.dim);
if(new RegExp(/^index.html?/i).test(targetFile)){
targetFile = targetFile.replace('index', 'index-temp');
placeholderPage = targetFile;