Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
!templates/**/.gitignore
5 changes: 5 additions & 0 deletions lib/core/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function move(){
return fs.move.apply(fs.move, arguments);
}

function moveSync() {
return fs.moveSync.apply(fs.moveSync, arguments);
}

function appendFileSync() {
return fs.appendFileSync.apply(fs.writeFileSync, arguments);
}
Expand Down Expand Up @@ -97,6 +101,7 @@ module.exports = {
copy,
copySync,
move,
moveSync,
readFile,
readFileSync,
appendFileSync,
Expand Down
3 changes: 3 additions & 0 deletions lib/utils/template_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class TemplateGenerator {
installTemplate(templatePath, name, installPackages) {
utils.cd(templatePath);
utils.sed('package.json', '%APP_NAME%', name);
if (fs.existsSync('dot.gitignore')) {
fs.moveSync('dot.gitignore', '.gitignore');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't move make the file "disappear" form the global install? Making it impossible to install the template twice? Shouldn't you copy instead?

Copy link
Contributor Author

@michaelsbradleyjr michaelsbradleyjr Aug 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only being moved inside the template instance. templatePath is the same as fspath a few lines above, which is derived from destinationFolder.

I was, though, concerned about this very thing. So I manually checked that it's only getting moved inside the template instance, and that in embark's template dir the file is still dot.gitignore.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh duh, you're right.

}

if (installPackages) {
console.log(__('Installing packages...').green);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.