Skip to content

Commit

Permalink
Fix two incorrect fs.copySync transformations
Browse files Browse the repository at this point in the history
These were using the parent of the actual target as dest
  • Loading branch information
raphinesse committed May 29, 2018
1 parent b07c608 commit eec80ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function copyTemplateFiles (templateDir, projectDir, isSubDir) {
// if template is a www dir
if (path.basename(templateDir) === 'www') {
copyPath = path.resolve(templateDir);
fs.copySync(copyPath, projectDir);
fs.copySync(copyPath, path.resolve(projectDir, 'www'));
} else {
var templateFiles = fs.readdirSync(templateDir);
// Remove directories, and files that are unwanted
Expand Down Expand Up @@ -400,7 +400,7 @@ function linkFromTemplate (templateDir, projectDir) {
// if template/www/config.xml then copy to project/config.xml
copyDst = path.join(projectDir, 'config.xml');
if (!fs.existsSync(copyDst) && fs.existsSync(copySrc)) {
fs.copySync(copySrc, projectDir);
fs.copySync(copySrc, copyDst);
}
}

Expand Down

0 comments on commit eec80ce

Please sign in to comment.