Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with gitignore when generating a new project #143

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Generate gitignore file from a txt file
  • Loading branch information
wuelcas committed Mar 31, 2020
commit 5553153edaa814134314471d5931f9e04427812f
8 changes: 6 additions & 2 deletions src/VoxaGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ export default class VoxaGenerator {
}

private async copyGitIgnoreFile() {
return this.generateHandlebarTemplateFile(".gitignore")
await this.copyFileOrFolder("gitignore.txt");
return fs.rename(
path.join(process.cwd(), this.data.folderName, "gitignore.txt"),
path.join(process.cwd(), this.data.folderName, ".gitignore")
);
}

private copyInteractionFile() {
Expand Down Expand Up @@ -226,7 +230,7 @@ export default class VoxaGenerator {
"package.json",
"src",
"interaction.json",
".gitignore",
"gitignore.txt",
`server.${this.data.ext}`,
"web"
];
Expand Down
File renamed without changes.
File renamed without changes.