Skip to content

Commit

Permalink
Merge pull request #43 from ensemblebd/master
Browse files Browse the repository at this point in the history
upgrade to vstudio 2017, project.json is deprecated
  • Loading branch information
pauldotknopf authored Feb 2, 2018
2 parents 673cefe + 0b37cf3 commit 60584d9
Show file tree
Hide file tree
Showing 17 changed files with 11,306 additions and 377 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ This approach is great for front-end developers because it gives them complete c

## Getting started

### Note: Windows
Requires python due to usage of node-gyp to compile sass libs.
Elevated command prompt:
```bash
npm install --global --production windows-build-tools
```
That should be done before proceeding with loading Visual Studio, if you want to use VStudio to automatically install dependencies.

### Yeoman
The best way to get started with this project is to use the Yeoman generator.

```bash
Expand Down
13 changes: 6 additions & 7 deletions ReactBoilerplate.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C23ABA50-98BF-4132-B6F6-43605AD05B0F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BCDEFAE7-02D5-49F6-9054-511C7B472A27}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactBoilerplate", "src\ReactBoilerplate\ReactBoilerplate.xproj", "{A9424E07-13A1-49AF-BE65-EBCE6B4F343A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactBoilerplate", "src\ReactBoilerplate\ReactBoilerplate.csproj", "{A9424E07-13A1-49AF-BE65-EBCE6B4F343A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -29,4 +25,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{A9424E07-13A1-49AF-BE65-EBCE6B4F343A} = {C23ABA50-98BF-4132-B6F6-43605AD05B0F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {966BFC76-8207-4754-A98E-B42C395FEB04}
EndGlobalSection
EndGlobal
3 changes: 0 additions & 3 deletions global.json

This file was deleted.

5 changes: 4 additions & 1 deletion src/ReactBoilerplate/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
root = true

[*]
indent_style = tab

[*.js]
indent_style = space
indent_size = 2
indent_size = 4

[*.md]
trim_trailing_whitespace = false
4 changes: 2 additions & 2 deletions src/ReactBoilerplate/Controllers/Account/ServerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public async Task<IActionResult> ExternalLoginCallback(bool autoLogin = true)
if (string.IsNullOrEmpty(info.ProviderDisplayName))
{
info.ProviderDisplayName =
_signInManager.GetExternalAuthenticationSchemes()
.SingleOrDefault(x => x.AuthenticationScheme.Equals(info.LoginProvider))?
(await _signInManager.GetExternalAuthenticationSchemesAsync())
.SingleOrDefault(x => x.Name.Equals(info.LoginProvider))?
.DisplayName;
if (string.IsNullOrEmpty(info.ProviderDisplayName))
{
Expand Down
14 changes: 8 additions & 6 deletions src/ReactBoilerplate/Controllers/BaseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ protected async Task<GlobalState> BuildState()
}

state.ExternalLogin.LoginProviders
.AddRange(_signInManager.GetExternalAuthenticationSchemes()
.Select(x => new ExternalLoginState.ExternalLoginProvider
{
Scheme = x.AuthenticationScheme,
DisplayName = x.DisplayName
}));
.AddRange(
(await _signInManager.GetExternalAuthenticationSchemesAsync())
.Select(x => new ExternalLoginState.ExternalLoginProvider
{
Scheme = x.Name,
DisplayName = x.DisplayName
})
);

return state;
}
Expand Down
9 changes: 5 additions & 4 deletions src/ReactBoilerplate/Controllers/Manage/ApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,16 @@ private async Task<ExternalLoginsState> GetExternalLoginsState()
foreach (var userLogin in userLogins.Where(userLogin => string.IsNullOrEmpty(userLogin.ProviderDisplayName)))
{
userLogin.ProviderDisplayName =
_signInManager.GetExternalAuthenticationSchemes()
.SingleOrDefault(x => x.AuthenticationScheme.Equals(userLogin.LoginProvider))?
(await _signInManager.GetExternalAuthenticationSchemesAsync())
.SingleOrDefault(x => x.Name.Equals(userLogin.LoginProvider))?
.DisplayName;
if (string.IsNullOrEmpty(userLogin.ProviderDisplayName))
{
userLogin.ProviderDisplayName = userLogin.LoginProvider;
}
}
var otherLogins = _signInManager.GetExternalAuthenticationSchemes().Where(auth => userLogins.All(ul => auth.AuthenticationScheme != ul.LoginProvider)).ToList();
var otherLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync())
.Where(auth => userLogins.All(ul => auth.Name != ul.LoginProvider)).ToList();

return new ExternalLoginsState
{
Expand All @@ -253,7 +254,7 @@ private async Task<ExternalLoginsState> GetExternalLoginsState()
OtherLogins = otherLogins.Select(x => new ExternalLoginState.ExternalLoginProvider
{
DisplayName = x.DisplayName,
Scheme = x.AuthenticationScheme
Scheme = x.Name
}).ToList()
};
}
Expand Down
1 change: 1 addition & 0 deletions src/ReactBoilerplate/Models/ApplicationUser.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;

namespace ReactBoilerplate.Models
Expand Down
70 changes: 70 additions & 0 deletions src/ReactBoilerplate/ReactBoilerplate.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>ReactBoilerplate</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>ReactBoilerplate</PackageId>
<UserSecretsId>89e1d495-c355-4990-bb58-6384b3b2e6df</UserSecretsId>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
<StartupObject></StartupObject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bower" Version="1.3.11" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="JavaScriptViewEngine">
<HintPath>..\lib\JavaScriptViewEngine.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="wwwroot\**\*">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="JavaScriptViewEngine.MvcCore1" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="2.0.1" />
<PackageReference Include="Redouble.AspNet.Webpack" Version="2.2.2" />
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0" />
</ItemGroup>

</Project>
27 changes: 0 additions & 27 deletions src/ReactBoilerplate/ReactBoilerplate.xproj

This file was deleted.

Loading

0 comments on commit 60584d9

Please sign in to comment.