Skip to content

Commit 1781e1d

Browse files
committed
Upgrade to latest vue-spa template
1 parent 9994336 commit 1781e1d

58 files changed

Lines changed: 38953 additions & 20165 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/node_modules
2+
*/npm-debug.log

.vscode/launch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"type": "coreclr",
1111
"request": "launch",
1212
"preLaunchTask": "build",
13-
"program": "${workspaceFolder}/VueSpaTemplate/bin/Debug/net5/VueSpaTemplate.dll",
13+
"program": "${workspaceFolder}/VueSpa/bin/Debug/net5/VueSpa.dll",
1414
"args": [],
15-
"cwd": "${workspaceFolder}/VueSpaTemplate",
15+
"cwd": "${workspaceFolder}/VueSpa",
1616
"console": "internalConsole",
1717
"stopAtEntry": false,
1818
"internalConsoleOptions": "openOnSessionStart",
@@ -25,9 +25,9 @@
2525
"type": "coreclr",
2626
"request": "launch",
2727
"preLaunchTask": "build",
28-
"program": "${workspaceFolder}/VueSpaTemplate/bin/Debug/net5/VueSpaTemplate.dll",
28+
"program": "${workspaceFolder}/VueSpa/bin/Debug/net5/VueSpa.dll",
2929
"args": [],
30-
"cwd": "${workspaceFolder}/VueSpaTemplate",
30+
"cwd": "${workspaceFolder}/VueSpa",
3131
"stopAtEntry": false,
3232
"internalConsoleOptions": "openOnSessionStart",
3333
"launchBrowser": {

Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
2-
WORKDIR /source
2+
WORKDIR /app
33

44
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
55
&& apt-get install -y --no-install-recommends nodejs \
66
&& echo "node version: $(node --version)" \
77
&& echo "npm version: $(npm --version)" \
88
&& rm -rf /var/lib/apt/lists/*
99

10-
COPY VueSpaTemplate/package.json .
11-
COPY VueSpaTemplate/npm-shrinkwrap.json .
12-
13-
RUN npm --prefix VueSpaTemplate install
14-
1510
COPY . .
1611
RUN dotnet restore
1712

18-
WORKDIR /source/VueSpaTemplate
19-
RUN dotnet publish -c release -o /app --no-restore
13+
WORKDIR /app/VueSpa
14+
RUN npm cache clean --force
15+
RUN dotnet publish -c release -o /out --no-restore
2016

2117
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
2218
WORKDIR /app
23-
COPY --from=build /app ./
24-
ENTRYPOINT ["dotnet", "VueSpaTemplate.dll"]
19+
COPY --from=build /out ./
20+
ENTRYPOINT ["dotnet", "VueSpa.dll"]

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44

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

7-
> Browse [source code](https://github.com/NetCoreTemplates/vue-spa), view live demo [vue-spa.web-templates.io](http://vue-spa.web-templates.io) and install with [dotnet-new](https://docs.servicestack.net/dotnet-new):
7+
> Browse [source code](https://github.com/NetCoreTemplates/vue-spa), view live demo [vue-spa.web-templates.io](http://vue-spa.web-templates.io) and install with [x new](https://docs.servicestack.net/dotnet-new):
88
99
$ dotnet tool install -g x
1010

1111
$ x new vue-spa ProjectName
1212

13+
Alternatively write new project files directly into an empty repository, using the Directory Name as the ProjectName:
14+
15+
$ git clone https://github.com/<User>/<ProjectName>.git
16+
$ cd <ProjectName>
17+
$ x new vue-spa
18+
1319
## Development workflow
1420

1521
Our recommendation during development is to run the `dev` npm script or Gulp task and leave it running in the background:

VueSpaTemplate.ServiceInterface/MyServices.cs renamed to VueSpa.ServiceInterface/MyServices.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using ServiceStack;
3-
using VueSpaTemplate.ServiceModel;
3+
using VueSpa.ServiceModel;
44

5-
namespace VueSpaTemplate.ServiceInterface
5+
namespace VueSpa.ServiceInterface
66
{
77
public class MyServices : Service
88
{

VueSpaTemplate.ServiceInterface/VueSpaTemplate.ServiceInterface.csproj renamed to VueSpa.ServiceInterface/VueSpa.ServiceInterface.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</ItemGroup>
1010

1111
<ItemGroup>
12-
<ProjectReference Include="..\VueSpaTemplate.ServiceModel\VueSpaTemplate.ServiceModel.csproj" />
12+
<ProjectReference Include="..\VueSpa.ServiceModel\VueSpa.ServiceModel.csproj" />
1313
</ItemGroup>
1414

1515
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using ServiceStack;
22

3-
namespace VueSpaTemplate.ServiceModel
3+
namespace VueSpa.ServiceModel
44
{
55
[Route("/hello")]
66
[Route("/hello/{Name}")]
File renamed without changes.

VueSpaTemplate.ServiceModel/VueSpaTemplate.ServiceModel.csproj renamed to VueSpa.ServiceModel/VueSpa.ServiceModel.csproj

File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using Funq;
22
using ServiceStack;
33
using NUnit.Framework;
4-
using VueSpaTemplate.ServiceInterface;
5-
using VueSpaTemplate.ServiceModel;
4+
using VueSpa.ServiceInterface;
5+
using VueSpa.ServiceModel;
66

7-
namespace VueSpaTemplate.Tests
7+
namespace VueSpa.Tests
88
{
99
public class IntegrationTest
1010
{

0 commit comments

Comments
 (0)