Templates are based on T4. When templates are generated, generally they will create a file for each Entity/Class. The exception to this rule would be for a solution file or a project file.
Steps
//Change the file extension from .txt to whatever is desired
string fileName = proj.GetFileName(entity.Name) + ".txt";
<#@ include file="$(projectDir)\Includes\CSharpHelper.tt" #>
Files are generated based on the last generated project. Specifically the project is copied into the GenerationInput.json
Any output files generated while developing templates will be overwritten when the generation is run.
There are several .tt files in the Includes directory for help with specific languages.