Add ReactTemplate
This commit is contained in:
parent
fec565bf4d
commit
be75da0202
|
|
@ -1,22 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace AspNetCoreSdkTests.Templates
|
||||
namespace AspNetCoreSdkTests.Templates
|
||||
{
|
||||
public class AngularTemplate : RazorApplicationBaseTemplate
|
||||
public class AngularTemplate : SpaBaseTemplate
|
||||
{
|
||||
public new static AngularTemplate Instance { get; } = new AngularTemplate();
|
||||
|
||||
protected AngularTemplate() { }
|
||||
|
||||
public override string Name => "angular";
|
||||
|
||||
protected override string RazorPath => "Pages";
|
||||
|
||||
public override IEnumerable<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
|
||||
{
|
||||
Path.Combine("Razor", RazorPath, "Error.g.cshtml.cs"),
|
||||
}.Select(p => Path.Combine(OutputPath, p)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
namespace AspNetCoreSdkTests.Templates
|
||||
{
|
||||
public class ReactTemplate : SpaBaseTemplate
|
||||
{
|
||||
public new static ReactTemplate Instance { get; } = new ReactTemplate();
|
||||
|
||||
protected ReactTemplate() { }
|
||||
|
||||
public override string Name => "react";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace AspNetCoreSdkTests.Templates
|
||||
{
|
||||
public abstract class SpaBaseTemplate : RazorApplicationBaseTemplate
|
||||
{
|
||||
protected override string RazorPath => "Pages";
|
||||
|
||||
public override IEnumerable<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
|
||||
{
|
||||
Path.Combine("Razor", RazorPath, "Error.g.cshtml.cs"),
|
||||
}.Select(p => Path.Combine(OutputPath, p)));
|
||||
}
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ namespace AspNetCoreSdkTests.Templates
|
|||
MvcTemplate.Instance,
|
||||
RazorTemplate.Instance,
|
||||
AngularTemplate.Instance,
|
||||
ReactTemplate.Instance,
|
||||
RazorClassLibraryTemplate.Instance,
|
||||
WebApiTemplate.Instance,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue