Skip to content

Commit

Permalink
Upgrade to .NET Core 2.1 + latest templates syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jul 2, 2018
1 parent a3a35f0 commit 8a082a2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions MyApp.Tests/MyApp.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Library</OutputType>
</PropertyGroup>
Expand All @@ -10,9 +10,9 @@
<ProjectReference Include="..\MyApp.ServiceInterface\MyApp.ServiceInterface.csproj" />
<ProjectReference Include="..\MyApp.ServiceModel\MyApp.ServiceModel.csproj" />

<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="NUnit" Version="3.10.*" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.*" />
<PackageReference Include="ServiceStack" Version="5.*" />
<PackageReference Include="ServiceStack.Kestrel" Version="5.*" />
</ItemGroup>
Expand Down
8 changes: 2 additions & 6 deletions MyApp/MyApp.csproj
@@ -1,25 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.*" />
<PackageReference Include="ServiceStack" Version="5.*" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MyApp.ServiceInterface\MyApp.ServiceInterface.csproj" />
<ProjectReference Include="..\MyApp.ServiceModel\MyApp.ServiceModel.csproj" />
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion MyApp/wwwroot/_layout.html
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="">
<meta name="author" content="">

{{ ifDebug | select: <script>{ '/js/hot-loader.js' | includeFile }</script> }}
{{#if debug}}<script>{{ '/js/hot-loader.js' | includeFile }}</script>{{/if}}
<link rel="stylesheet" href="/assets/css/bootstrap.css">
<link rel="stylesheet" href="/assets/css/default.css">
</head>
Expand Down
12 changes: 7 additions & 5 deletions MyApp/wwwroot/index.html
@@ -1,13 +1,13 @@
<!--
title: Bootstrap Templates Starter
title: Bootstrap Templates
-->

<p class="lead">
Complete with page layout, menu partial and responsive navigation!
</p>
<ul class="list-unstyled">
<li>Bootstrap 4.0.0-beta.2</li>
<li>jQuery 3.2.1</li>
<li>Bootstrap 4.0.0</li>
<li>jQuery 3.3.1</li>
</ul>

<div class="container" style="padding:60px 0 0 250px">
Expand All @@ -25,7 +25,8 @@ <h4 id="result"></h4>
</div>
</div>

{{ `<script>
{{#raw appendTo scripts}}
<script>
$('#Name').keyup(function () {
var name = $('#Name').val();
if (name) {
Expand All @@ -36,4 +37,5 @@ <h4 id="result"></h4>
$('#result').html('');
}
});
</script>` | appendTo: scripts }}
</script>
{{/raw}}
6 changes: 5 additions & 1 deletion MyApp/wwwroot/menu.html
Expand Up @@ -6,6 +6,10 @@

<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
{{ links | select: <li class="nav-item { 'active' | ifMatchesPathInfo(it.Key) }"><a class="nav-link" href="{ it.Key }">{ it.Value }</a></li> }}
{{#each links}}
<li {{ {active: matchesPathInfo(Key)} | htmlClass }}>
<a class="nav-link" href="{{Key}}">{{Value}}</a>
</li>
{{/each}}
</ul>
</div>
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# templates

.NET Core 2.0 ServiceStack Templates Bootstrap Website
.NET Core 2.1 ServiceStack Templates Bootstrap Website

[![](https://raw.githubusercontent.com/ServiceStack/Assets/master/csharp-templates/templates.png)](http://templates.web-templates.io/)

Expand Down

0 comments on commit 8a082a2

Please sign in to comment.