Merge branch 'merge/release/2.2-to-master'

This commit is contained in:
Ryan Brandenburg 2018-08-14 09:50:10 -07:00
commit 07b97e2f89
6 changed files with 69 additions and 30 deletions

52
.gitattributes vendored Normal file
View File

@ -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

View File

@ -1,7 +1,6 @@
$customHive = "$PSScriptRoot/CustomHive" $customHive = "$PSScriptRoot/CustomHive"
function Test-Template($templateName, $templateNupkg, $isSPA) function Test-Template($templateName, $templateNupkg, $isSPA) {
{
$tmpDir = "$PSScriptRoot/tmp" $tmpDir = "$PSScriptRoot/tmp"
Remove-Item -Path $tmpDir -Recurse -ErrorAction Ignore 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 New-Item -ErrorAction Ignore -Path $tmpDir -ItemType Directory
Push-Location $tmpDir Push-Location $tmpDir
try { try {
Run-DotnetNew $templateName Run-DotnetNew $templateName, "--no-restore"
if($isSPA) $csproj = "$tmpDir/tmp.csproj"
{ $csprojContent = Get-Content -Path $csproj -Raw
Push-Location "ClientApp" $csprojContent = $csprojContent -replace ('<Project Sdk="Microsoft.NET.Sdk.Web">', "<Project Sdk=""Microsoft.NET.Sdk.Web"">`n<Import Project=""$PSScriptRoot/../test/Templates.Test/bin/Release/netcoreapp2.2/TemplateTests.props"" />")
try { $csprojContent | Set-Content $csproj
npm install
} dotnet publish
finally { dotnet run bin\Release\netcoreapp2.2\publish\tmp.dll
Pop-Location
}
}
dotnet run
} }
finally { finally {
Pop-Location Pop-Location

View File

@ -28,10 +28,7 @@
<ItemGroup> <ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list --> <!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" /> <Content Remove="$(SpaRoot)**" />
<None Include="$(SpaRoot)**" <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
Exclude="$(SpaRoot)node_modules\**"
CopyToPublishDirectory="PreserveNewest"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup> </ItemGroup>
<!--/-:cnd:noEmit --> <!--/-:cnd:noEmit -->
@ -54,7 +51,7 @@
<!-- Include the newly-built files in the publish output --> <!-- Include the newly-built files in the publish output -->
<ItemGroup> <ItemGroup>
<DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**; $(SpaRoot)package.json" /> <DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
<DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" /> <DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)"> <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath> <RelativePath>%(DistFiles.Identity)</RelativePath>

View File

@ -25,10 +25,7 @@
<ItemGroup> <ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list --> <!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" /> <Content Remove="$(SpaRoot)**" />
<None Include="$(SpaRoot)**" <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
Exclude="$(SpaRoot)node_modules\**"
CopyToPublishDirectory="PreserveNewest"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup> </ItemGroup>
<!--/-:cnd:noEmit --> <!--/-:cnd:noEmit -->

View File

@ -25,10 +25,7 @@
<ItemGroup> <ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list --> <!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" /> <Content Remove="$(SpaRoot)**" />
<None Include="$(SpaRoot)**" <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
Exclude="$(SpaRoot)node_modules\**"
CopyToPublishDirectory="PreserveNewest"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup> </ItemGroup>
<!--/-:cnd:noEmit --> <!--/-:cnd:noEmit -->
@ -50,7 +47,7 @@
<!-- Include the newly-built files in the publish output --> <!-- Include the newly-built files in the publish output -->
<ItemGroup> <ItemGroup>
<DistFiles Include="$(SpaRoot)build\**; $(SpaRoot)build-ssr\**; $(SpaRoot)package.json" /> <DistFiles Include="$(SpaRoot)build\**; $(SpaRoot)build-ssr\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)"> <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath> <RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>

View File

@ -24,8 +24,8 @@
"src/assets" "src/assets"
], ],
"styles": [ "styles": [
"src/styles.css", "node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css" "src/styles.css"
], ],
"scripts": [] "scripts": []
}, },