@@ -9,7 +9,7 @@ import * as childProcess from 'child_process';
9
9
import * as targz from 'tar.gz' ;
10
10
11
11
const isWindows = / ^ w i n / . test ( process . platform ) ;
12
- const textFileExtensions = [ '.gitignore' , 'template_gitignore' , ' .config', '.cs' , '.cshtml' , '.csproj' , '.html' , '.js' , '.json' , '.jsx' , '.md' , '.nuspec' , '.ts' , '.tsx' ] ;
12
+ const textFileExtensions = [ '.gitignore' , '.config' , '.cs' , '.cshtml' , '.csproj' , '.html' , '.js' , '.json' , '.jsx' , '.md' , '.nuspec' , '.ts' , '.tsx' ] ;
13
13
14
14
const dotNetPackages = [
15
15
'Microsoft.DotNet.Web.Spa.ProjectTemplates' ,
@@ -28,10 +28,7 @@ function writeFileEnsuringDirExists(root: string, filename: string, contents: st
28
28
}
29
29
30
30
function listFilesExcludingGitignored ( root : string ) : string [ ] {
31
- // Note that the gitignore files, prior to be written by the generator, are called 'template_gitignore'
32
- // instead of '.gitignore'. This is a workaround for Yeoman doing strange stuff with .gitignore files
33
- // (it renames them to .npmignore, which is not helpful).
34
- let gitIgnorePath = path . join ( root , 'template_gitignore' ) ;
31
+ let gitIgnorePath = path . join ( root , '.gitignore' ) ;
35
32
let gitignoreEvaluator = fs . existsSync ( gitIgnorePath )
36
33
? gitignore . compile ( fs . readFileSync ( gitIgnorePath , 'utf8' ) )
37
34
: { accepts : ( ) => true } ;
@@ -99,8 +96,7 @@ function buildDotNetNewNuGetPackage(packageId: string) {
99
96
const sourceProjectName = 'WebApplicationBasic' ;
100
97
const projectGuid = '00000000-0000-0000-0000-000000000000' ;
101
98
const filenameReplacements = [
102
- { from : / .* \. c s p r o j $ / , to : `${ sourceProjectName } .csproj` } ,
103
- { from : / \b t e m p l a t e _ g i t i g n o r e $ / , to : '.gitignore' }
99
+ { from : / .* \. c s p r o j $ / , to : `${ sourceProjectName } .csproj` }
104
100
] ;
105
101
const contentReplacements = [ ] ;
106
102
0 commit comments