Skip to content

Commit

Permalink
Minor fix to writing gitignore file.
Browse files Browse the repository at this point in the history
Was referencing the wrong file path.
  • Loading branch information
khalidx committed Jul 7, 2019
1 parent 4989b59 commit a6f6ae4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/cli/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ export const writeDeployFile = (directory: string, file: string, deploy: Deploy)
* @param directory the absolute path of the directory to use
* @param file the path of the document file to use
*/
export const writeGitignoreFile = async (directory: string, file: string): Promise<void> => fse.writeFile(swaggerFile(directory, file), '# Ignoring this directory (generated by resource-x)\n*\n# Except for the deploy.json\n!deploy.json\n')
export const writeGitignoreFile = async (directory: string, file: string): Promise<void> => fse.writeFile(gitignoreFile(directory, file), '# Ignoring this directory (generated by resource-x)\n*\n# Except for the deploy.yaml\n!deploy.yaml\n')
1 change: 0 additions & 1 deletion src/cli/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const generate = async (directory: string, file: string): Promise<void> =
// Ensure the output .rx/<file>/ directory is created
await ensureDir(files.rxSubdirectory(directory, file))
// Write a .gitignore to ensure generated files are not committed
let gitignore = '# Ignoring this directory (generated by resource-x)\n*\n# Except for the deploy.json\n!deploy.json\n'
await files.writeGitignoreFile(directory, file)
// Write the API specification object to the file-specific directory
await files.writeSwaggerFile(directory, file, specification)
Expand Down

0 comments on commit a6f6ae4

Please sign in to comment.