Skip to content

Commit 8d6119f

Browse files
Remove the Yeoman-specific gitignore workaround
1 parent 0291686 commit 8d6119f

File tree

7 files changed

+3
-7
lines changed

7 files changed

+3
-7
lines changed

templates/Microsoft.AspNetCore.SpaTemplates/Content/aurelia/template_gitignore renamed to templates/Microsoft.AspNetCore.SpaTemplates/Content/aurelia/.gitignore

File renamed without changes.

templates/Microsoft.AspNetCore.SpaTemplates/Content/knockout/template_gitignore renamed to templates/Microsoft.AspNetCore.SpaTemplates/Content/knockout/.gitignore

File renamed without changes.

templates/Microsoft.AspNetCore.SpaTemplates/Content/vue/template_gitignore renamed to templates/Microsoft.AspNetCore.SpaTemplates/Content/vue/.gitignore

File renamed without changes.

templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/Content/angular/template_gitignore renamed to templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/Content/angular/.gitignore

File renamed without changes.

templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/Content/react/template_gitignore renamed to templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/Content/react/.gitignore

File renamed without changes.

templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/Content/redux/template_gitignore renamed to templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/Content/redux/.gitignore

File renamed without changes.

‎templates/package-builder/src/build/build.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as childProcess from 'child_process'
99
import*astargzfrom'tar.gz';
1010

1111
constisWindows=/^win/.test(process.platform);
12-
consttextFileExtensions=['.gitignore','template_gitignore','.config','.cs','.cshtml','.csproj','.html','.js','.json','.jsx','.md','.nuspec','.ts','.tsx'];
12+
consttextFileExtensions=['.gitignore','.config','.cs','.cshtml','.csproj','.html','.js','.json','.jsx','.md','.nuspec','.ts','.tsx'];
1313

1414
constdotNetPackages=[
1515
'Microsoft.DotNet.Web.Spa.ProjectTemplates',
@@ -28,10 +28,7 @@ function writeFileEnsuringDirExists(root: string, filename: string, contents: st
2828
}
2929

3030
functionlistFilesExcludingGitignored(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-
letgitIgnorePath=path.join(root,'template_gitignore');
31+
letgitIgnorePath=path.join(root,'.gitignore');
3532
letgitignoreEvaluator=fs.existsSync(gitIgnorePath)
3633
? gitignore.compile(fs.readFileSync(gitIgnorePath,'utf8'))
3734
: {accepts: ()=>true};
@@ -99,8 +96,7 @@ function buildDotNetNewNuGetPackage(packageId: string){
9996
constsourceProjectName='WebApplicationBasic';
10097
constprojectGuid='00000000-0000-0000-0000-000000000000';
10198
constfilenameReplacements=[
102-
{from: /.*\.csproj$/,to: `${sourceProjectName}.csproj`},
103-
{from: /\btemplate_gitignore$/,to: '.gitignore'}
99+
{from: /.*\.csproj$/,to: `${sourceProjectName}.csproj`}
104100
];
105101
constcontentReplacements=[];
106102

0 commit comments

Comments
(0)