Skip to content

Commit

Permalink
fix(install): ensure directories default exist
Browse files Browse the repository at this point in the history
  • Loading branch information
pathurs committed May 31, 2019
1 parent 8bea710 commit 5daf0a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ async function copyDefaultFiles() {
const absoluteFilePath = path.join(RootPath.path, relativeFilePath);

if (!fs.existsSync(absoluteFilePath)) {
const directoryPath = path.dirname(absoluteFilePath);

fs.mkdirSync(directoryPath, { recursive: true });
fs.copyFileSync(defaultFilePath, absoluteFilePath);
// tslint:disable-next-line: no-console
console.log(`Successfully copied file '${relativeFilePath}'.`);
Expand Down

0 comments on commit 5daf0a7

Please sign in to comment.