Publish generator-aspnetcore-spa 0.6.1

This commit is contained in:
SteveSandersonMS
2016-11-28 17:48:08 +00:00
parent 03774253eb
commit 834301e50d
2 changed files with 16 additions and 6 deletions

View File

@@ -133,11 +133,21 @@ class MyGenerator extends yeoman.Base {
inputFullPath = tempPath;
}
this.fs.copyTpl(
inputFullPath,
destinationFullPath,
this._answers
);
const outputDirBasename = path.basename(path.dirname(destinationFullPath));
if (outputDirBasename === 'dist') {
// Don't do token replacement in 'dist' files, as they might just randomly contain
// sequences like '<%=' even though they aren't actually template files
this.fs.copy(
inputFullPath,
destinationFullPath
);
} else {
this.fs.copyTpl(
inputFullPath,
destinationFullPath,
this._answers
);
}
}
});
}