diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..d4ee1cb7f3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,52 @@ +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain + +*.jpg binary +*.png binary +*.gif binary + +*.cs text=auto diff=csharp +*.vb text=auto +*.resx text=auto +*.c text=auto +*.cpp text=auto +*.cxx text=auto +*.h text=auto +*.hxx text=auto +*.py text=auto +*.rb text=auto +*.java text=auto +*.html text=auto +*.htm text=auto +*.css text=auto +*.scss text=auto +*.sass text=auto +*.less text=auto +*.js text=auto +*.lisp text=auto +*.clj text=auto +*.sql text=auto +*.php text=auto +*.lua text=auto +*.m text=auto +*.asm text=auto +*.erl text=auto +*.fs text=auto +*.fsx text=auto +*.hs text=auto + +*.csproj text=auto +*.vbproj text=auto +*.fsproj text=auto +*.dbproj text=auto +*.sln text=auto eol=crlf + +*.sh eol=lf diff --git a/scripts/Custom-Hive.ps1 b/scripts/Custom-Hive.ps1 index 5ff80be557..f66bc12714 100644 --- a/scripts/Custom-Hive.ps1 +++ b/scripts/Custom-Hive.ps1 @@ -1,7 +1,6 @@ $customHive = "$PSScriptRoot/CustomHive" -function Test-Template($templateName, $templateNupkg, $isSPA) -{ +function Test-Template($templateName, $templateNupkg, $isSPA) { $tmpDir = "$PSScriptRoot/tmp" Remove-Item -Path $tmpDir -Recurse -ErrorAction Ignore @@ -13,18 +12,15 @@ function Test-Template($templateName, $templateNupkg, $isSPA) New-Item -ErrorAction Ignore -Path $tmpDir -ItemType Directory Push-Location $tmpDir try { - Run-DotnetNew $templateName - if($isSPA) - { - Push-Location "ClientApp" - try { - npm install - } - finally { - Pop-Location - } - } - dotnet run + Run-DotnetNew $templateName, "--no-restore" + $csproj = "$tmpDir/tmp.csproj" + $csprojContent = Get-Content -Path $csproj -Raw + $csprojContent = $csprojContent -replace ('', "`n") + $csprojContent | Set-Content $csproj + + dotnet publish + dotnet run bin\Release\netcoreapp2.2\publish\tmp.dll + } finally { Pop-Location diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in index 40a718dcf9..2fb111559d 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in @@ -28,10 +28,7 @@ - + @@ -54,7 +51,7 @@ - + %(DistFiles.Identity) diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in index af9631cc02..a88d7f2576 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in @@ -25,10 +25,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in index 18e11ea35c..7f80718e6a 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in @@ -25,10 +25,7 @@ - + @@ -50,7 +47,7 @@ - + %(DistFiles.Identity) PreserveNewest diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json index fd8a52cf13..cf9991fd59 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json @@ -24,8 +24,8 @@ "src/assets" ], "styles": [ - "src/styles.css", - "node_modules/bootstrap/dist/css/bootstrap.min.css" + "node_modules/bootstrap/dist/css/bootstrap.min.css", + "src/styles.css" ], "scripts": [] },