mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Remove template build dynamic filename replacement. Working towards eliminating template build process completely.
This commit is contained in:
@@ -11,11 +11,11 @@
|
|||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{
|
{
|
||||||
"path": "WebApplicationBasic.csproj"
|
"path": "AureliaSpa.csproj"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shortName": "aurelia",
|
"shortName": "aurelia",
|
||||||
"sourceName": "WebApplicationBasic",
|
"sourceName": "AureliaSpa",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"source": "./",
|
"source": "./",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="#/home">WebApplicationBasic</a>
|
<a class="navbar-brand" href="#/home">AureliaSpa</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="navbar-collapse collapse">
|
<div class="navbar-collapse collapse">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace AureliaSpa.Controllers
|
||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace AureliaSpa.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class SampleDataController : Controller
|
public class SampleDataController : Controller
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace AureliaSpa
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.SpaServices.Webpack;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace AureliaSpa
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] - WebApplicationBasic</title>
|
<title>@ViewData["Title"] - AureliaSpa</title>
|
||||||
<base href="~/" />
|
<base href="~/" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@using WebApplicationBasic
|
@using AureliaSpa
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "AureliaSpa",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/webpack-env": {
|
"@types/webpack-env": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "AureliaSpa",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{
|
{
|
||||||
"path": "WebApplicationBasic.csproj"
|
"path": "KnockoutSpa.csproj"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shortName": "knockout",
|
"shortName": "knockout",
|
||||||
"sourceName": "WebApplicationBasic",
|
"sourceName": "KnockoutSpa",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"source": "./",
|
"source": "./",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<span class='icon-bar'></span>
|
<span class='icon-bar'></span>
|
||||||
<span class='icon-bar'></span>
|
<span class='icon-bar'></span>
|
||||||
</button>
|
</button>
|
||||||
<a class='navbar-brand' href='/'>WebApplicationBasic</a>
|
<a class='navbar-brand' href='/'>KnockoutSpa</a>
|
||||||
</div>
|
</div>
|
||||||
<div class='clearfix'></div>
|
<div class='clearfix'></div>
|
||||||
<div class='navbar-collapse collapse'>
|
<div class='navbar-collapse collapse'>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace KnockoutSpa.Controllers
|
||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace KnockoutSpa.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class SampleDataController : Controller
|
public class SampleDataController : Controller
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace KnockoutSpa
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.SpaServices.Webpack;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace KnockoutSpa
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] - WebApplicationBasic</title>
|
<title>@ViewData["Title"] - KnockoutSpa</title>
|
||||||
<base href="~/" />
|
<base href="~/" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@using WebApplicationBasic
|
@using KnockoutSpa
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "KnockoutSpa",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/core-js": {
|
"@types/core-js": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "KnockoutSpa",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{
|
{
|
||||||
"path": "WebApplicationBasic.csproj"
|
"path": "VueSpa.csproj"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shortName": "vue",
|
"shortName": "vue",
|
||||||
"sourceName": "WebApplicationBasic",
|
"sourceName": "VueSpa",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"source": "./",
|
"source": "./",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="/">WebApplicationBasic</a>
|
<a class="navbar-brand" href="/">VueSpa</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="navbar-collapse collapse">
|
<div class="navbar-collapse collapse">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace VueSpa.Controllers
|
||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace VueSpa.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class SampleDataController : Controller
|
public class SampleDataController : Controller
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace VueSpa
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.SpaServices.Webpack;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace VueSpa
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] - WebApplicationBasic</title>
|
<title>@ViewData["Title"] - VueSpa</title>
|
||||||
<base href="~/" />
|
<base href="~/" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@using WebApplicationBasic
|
@using VueSpa
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "VueSpa",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/webpack-env": {
|
"@types/webpack-env": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "VueSpa",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{
|
{
|
||||||
"path": "WebApplicationBasic.csproj"
|
"path": "AngularSpa.csproj"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shortName": "angular",
|
"shortName": "angular",
|
||||||
"sourceName": "WebApplicationBasic",
|
"sourceName": "AngularSpa",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"source": "./",
|
"source": "./",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<span class='icon-bar'></span>
|
<span class='icon-bar'></span>
|
||||||
<span class='icon-bar'></span>
|
<span class='icon-bar'></span>
|
||||||
</button>
|
</button>
|
||||||
<a class='navbar-brand' [routerLink]="['/home']">WebApplicationBasic</a>
|
<a class='navbar-brand' [routerLink]="['/home']">AngularSpa</a>
|
||||||
</div>
|
</div>
|
||||||
<div class='clearfix'></div>
|
<div class='clearfix'></div>
|
||||||
<div class='navbar-collapse collapse'>
|
<div class='navbar-collapse collapse'>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace AngularSpa.Controllers
|
||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace AngularSpa.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class SampleDataController : Controller
|
public class SampleDataController : Controller
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace AngularSpa
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.SpaServices.Webpack;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace AngularSpa
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] - WebApplicationBasic</title>
|
<title>@ViewData["Title"] - AngularSpa</title>
|
||||||
<base href="~/" />
|
<base href="~/" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@using WebApplicationBasic
|
@using AngularSpa
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "AngularSpa",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": {
|
"@angular/animations": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "AngularSpa",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{
|
{
|
||||||
"path": "WebApplicationBasic.csproj"
|
"path": "ReactSpa.csproj"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shortName": "react",
|
"shortName": "react",
|
||||||
"sourceName": "WebApplicationBasic",
|
"sourceName": "ReactSpa",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"source": "./",
|
"source": "./",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class NavMenu extends React.Component<{}, {}> {
|
|||||||
<span className='icon-bar'></span>
|
<span className='icon-bar'></span>
|
||||||
<span className='icon-bar'></span>
|
<span className='icon-bar'></span>
|
||||||
</button>
|
</button>
|
||||||
<Link className='navbar-brand' to={ '/' }>WebApplicationBasic</Link>
|
<Link className='navbar-brand' to={ '/' }>ReactSpa</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className='clearfix'></div>
|
<div className='clearfix'></div>
|
||||||
<div className='navbar-collapse collapse'>
|
<div className='navbar-collapse collapse'>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace ReactSpa.Controllers
|
||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace ReactSpa.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class SampleDataController : Controller
|
public class SampleDataController : Controller
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace ReactSpa
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.SpaServices.Webpack;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace ReactSpa
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] - WebApplicationBasic</title>
|
<title>@ViewData["Title"] - ReactSpa</title>
|
||||||
<base href="~/" />
|
<base href="~/" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@using WebApplicationBasic
|
@using ReactSpa
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "ReactSpa",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/history": {
|
"@types/history": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "ReactSpa",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{
|
{
|
||||||
"path": "WebApplicationBasic.csproj"
|
"path": "ReactReduxSpa.csproj"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shortName": "reactredux",
|
"shortName": "reactredux",
|
||||||
"sourceName": "WebApplicationBasic",
|
"sourceName": "ReactReduxSpa",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"source": "./",
|
"source": "./",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class NavMenu extends React.Component<{}, {}> {
|
|||||||
<span className='icon-bar'></span>
|
<span className='icon-bar'></span>
|
||||||
<span className='icon-bar'></span>
|
<span className='icon-bar'></span>
|
||||||
</button>
|
</button>
|
||||||
<Link className='navbar-brand' to={ '/' }>WebApplicationBasic</Link>
|
<Link className='navbar-brand' to={ '/' }>ReactReduxSpa</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className='clearfix'></div>
|
<div className='clearfix'></div>
|
||||||
<div className='navbar-collapse collapse'>
|
<div className='navbar-collapse collapse'>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace ReactReduxSpa.Controllers
|
||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace WebApplicationBasic.Controllers
|
namespace ReactReduxSpa.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class SampleDataController : Controller
|
public class SampleDataController : Controller
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace ReactReduxSpa
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using Microsoft.AspNetCore.SpaServices.Webpack;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace WebApplicationBasic
|
namespace ReactReduxSpa
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] - WebApplicationBasic</title>
|
<title>@ViewData["Title"] - ReactReduxSpa</title>
|
||||||
<base href="~/" />
|
<base href="~/" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@using WebApplicationBasic
|
@using ReactReduxSpa
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
@addTagHelper *, Microsoft.AspNetCore.SpaServices
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "ReactReduxSpa",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/history": {
|
"@types/history": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "WebApplicationBasic",
|
"name": "ReactReduxSpa",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -9,18 +9,12 @@ import * as childProcess from 'child_process';
|
|||||||
import * as targz from 'tar.gz';
|
import * as targz from 'tar.gz';
|
||||||
|
|
||||||
const isWindows = /^win/.test(process.platform);
|
const isWindows = /^win/.test(process.platform);
|
||||||
const textFileExtensions = ['.gitignore', '.config', '.cs', '.cshtml', '.csproj', '.html', '.js', '.json', '.jsx', '.md', '.nuspec', '.ts', '.tsx'];
|
|
||||||
|
|
||||||
const dotNetPackages = [
|
const dotNetPackages = [
|
||||||
'Microsoft.DotNet.Web.Spa.ProjectTemplates',
|
'Microsoft.DotNet.Web.Spa.ProjectTemplates',
|
||||||
'Microsoft.AspNetCore.SpaTemplates'
|
'Microsoft.AspNetCore.SpaTemplates'
|
||||||
];
|
];
|
||||||
|
|
||||||
function isTextFile(filename: string): boolean {
|
|
||||||
return textFileExtensions.indexOf(path.extname(filename).toLowerCase()) >= 0
|
|
||||||
|| textFileExtensions.indexOf(path.basename(filename)) >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function writeFileEnsuringDirExists(root: string, filename: string, contents: string | Buffer) {
|
function writeFileEnsuringDirExists(root: string, filename: string, contents: string | Buffer) {
|
||||||
let fullPath = path.join(root, filename);
|
let fullPath = path.join(root, filename);
|
||||||
mkdirp.sync(path.dirname(fullPath));
|
mkdirp.sync(path.dirname(fullPath));
|
||||||
@@ -45,18 +39,9 @@ function applyContentReplacements(sourceContent: Buffer, contentReplacements: {
|
|||||||
return new Buffer(sourceText, 'utf8');
|
return new Buffer(sourceText, 'utf8');
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeTemplate(sourceRoot: string, destRoot: string, contentReplacements: { from: RegExp, to: string }[], filenameReplacements: { from: RegExp, to: string }[]) {
|
function writeTemplate(sourceRoot: string, destRoot: string) {
|
||||||
listFilesExcludingGitignored(sourceRoot).forEach(fn => {
|
listFilesExcludingGitignored(sourceRoot).forEach(fn => {
|
||||||
let sourceContent = fs.readFileSync(path.join(sourceRoot, fn));
|
let sourceContent = fs.readFileSync(path.join(sourceRoot, fn));
|
||||||
if (isTextFile(fn)) {
|
|
||||||
sourceContent = applyContentReplacements(sourceContent, contentReplacements);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Also apply replacements in filenames
|
|
||||||
filenameReplacements.forEach(replacement => {
|
|
||||||
fn = fn.replace(replacement.from, replacement.to);
|
|
||||||
});
|
|
||||||
|
|
||||||
writeFileEnsuringDirExists(destRoot, fn, sourceContent);
|
writeFileEnsuringDirExists(destRoot, fn, sourceContent);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -93,20 +78,13 @@ function buildDotNetNewNuGetPackage(packageId: string) {
|
|||||||
rimraf.sync(outputRoot);
|
rimraf.sync(outputRoot);
|
||||||
|
|
||||||
// Copy template files
|
// Copy template files
|
||||||
const sourceProjectName = 'WebApplicationBasic';
|
|
||||||
const projectGuid = '00000000-0000-0000-0000-000000000000';
|
|
||||||
const filenameReplacements = [
|
|
||||||
{ from: /.*\.csproj$/, to: `${sourceProjectName}.csproj` }
|
|
||||||
];
|
|
||||||
const contentReplacements = [];
|
|
||||||
|
|
||||||
const packageSourceRootDir = path.join('../', packageId);
|
const packageSourceRootDir = path.join('../', packageId);
|
||||||
const templatesInPackage = fs.readdirSync(path.join(packageSourceRootDir, 'Content'));
|
const templatesInPackage = fs.readdirSync(path.join(packageSourceRootDir, 'Content'));
|
||||||
|
|
||||||
_.forEach(templatesInPackage, templateName => {
|
_.forEach(templatesInPackage, templateName => {
|
||||||
const templateSourceDir = path.join(packageSourceRootDir, 'Content', templateName);
|
const templateSourceDir = path.join(packageSourceRootDir, 'Content', templateName);
|
||||||
const templateOutputDir = path.join(outputRoot, 'Content', templateName);
|
const templateOutputDir = path.join(outputRoot, 'Content', templateName);
|
||||||
writeTemplate(templateSourceDir, templateOutputDir, contentReplacements, filenameReplacements);
|
writeTemplate(templateSourceDir, templateOutputDir);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create the .nuspec file
|
// Create the .nuspec file
|
||||||
|
|||||||
Reference in New Issue
Block a user