From a6f6ae4ee22a278a73ad65f79af530741218ccd4 Mon Sep 17 00:00:00 2001 From: Khalid Zoabi Date: Sat, 6 Jul 2019 22:29:17 -0400 Subject: [PATCH] Minor fix to writing gitignore file. Was referencing the wrong file path. --- src/cli/files.ts | 2 +- src/cli/generate.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cli/files.ts b/src/cli/files.ts index b3a5535..b6b6fbe 100644 --- a/src/cli/files.ts +++ b/src/cli/files.ts @@ -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 => 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 => fse.writeFile(gitignoreFile(directory, file), '# Ignoring this directory (generated by resource-x)\n*\n# Except for the deploy.yaml\n!deploy.yaml\n') diff --git a/src/cli/generate.ts b/src/cli/generate.ts index f2c2e7d..5099e77 100644 --- a/src/cli/generate.ts +++ b/src/cli/generate.ts @@ -37,7 +37,6 @@ export const generate = async (directory: string, file: string): Promise = // Ensure the output .rx// 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)