add gitignore to TS API client

This commit is contained in:
wing328
2016-06-19 11:45:51 +08:00
parent 977ea6e9e9
commit 41a615e4eb
23 changed files with 840 additions and 9 deletions

View File

@@ -68,6 +68,8 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod
supportingFiles.add(new SupportingFile("models.mustache", modelPackage().replace('.', File.separatorChar), "models.ts"));
supportingFiles.add(new SupportingFile("apis.mustache", apiPackage().replace('.', File.separatorChar), "api.ts"));
supportingFiles.add(new SupportingFile("index.mustache", getIndexDirectory(), "index.ts"));
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
if(additionalProperties.containsKey(NPM_NAME)) {
addNpmPackageGeneration();

View File

@@ -21,7 +21,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
super.processOpts();
supportingFiles.add(new SupportingFile("api.d.mustache", apiPackage().replace('.', File.separatorChar), "api.d.ts"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
//supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
}

View File

@@ -30,6 +30,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
supportingFiles.add(new SupportingFile("package.json.mustache", "", "package.json"));
supportingFiles.add(new SupportingFile("typings.json.mustache", "", "typings.json"));
supportingFiles.add(new SupportingFile("tsconfig.json.mustache", "", "tsconfig.json"));
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
if(additionalProperties.containsKey(NPM_NAME)) {
this.setNpmName(additionalProperties.get(NPM_NAME).toString());

View File

@@ -41,6 +41,7 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen
super.processOpts();
supportingFiles.add(new SupportingFile("api.mustache", null, "api.ts"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
if(additionalProperties.containsKey(NPM_NAME)) {
addNpmPackageGeneration();