Skip to content

Commit

Permalink
Update to recommended Dev process for aspnetcore3+Vue and switch to i…
Browse files Browse the repository at this point in the history
…mproved theme (#256)
  • Loading branch information
rnwood committed Mar 1, 2020
1 parent 147d326 commit 060da6f
Show file tree
Hide file tree
Showing 97 changed files with 14,828 additions and 5,971 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
@@ -1,5 +1,5 @@
{
"appPort": [2525, 8080],
"extensions": ["ms-vscode.csharp"]
"extensions": ["ms-vscode.csharp", "formulahendry.dotnet-test-explorer", "msjsdiag.debugger-for-chrome", "ms-azuretools.vscode-docker", "dbaeumer.vscode-eslint", "octref.vetur"]

}
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -28,7 +28,7 @@ Obj/

# Visual Studio 2015 cache/options directory
.vs/
/wwwroot/dist/
Rnwood.Smtp4dev/wwwroot/*

/yarn.lock

Expand Down
22 changes: 2 additions & 20 deletions .vscode/launch.json
Expand Up @@ -11,13 +11,12 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Rnwood.Smtp4dev/bin/Debug/netcoreapp2.2/Rnwood.Smtp4dev.dll",
"args": ["--smtpport=2525", "--server.urls=8080"],
"program": "${workspaceFolder}/Rnwood.Smtp4dev/bin/Debug/netcoreapp3.1/Rnwood.Smtp4dev.dll",
"cwd": "${workspaceFolder}/Rnwood.Smtp4dev",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"launchBrowser": {
"enabled": false,
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
Expand All @@ -32,30 +31,13 @@
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": "Debug in Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:28261",
"webRoot": "${workspaceFolder}/dist/",
"sourceMaps": true
}
],
"compounds": [
{
"name": ".NET Core Launch (web) AND Debug in Chrome",
"configurations": [".NET Core Launch (web)", "Debug in Chrome"]
}
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,13 @@
{
"eslint.lintTask.enable": true,
"eslint.validate": [
"typescript",
"vue"
],
"eslint.workingDirectories": [
"Rnwood.Smtp4dev/ClientApp"
],
"npm.includeDirectories": [
"Rnwood.Smtp4dev/ClientApp"
]
}
7 changes: 1 addition & 6 deletions Dockerfile.windows
Expand Up @@ -33,11 +33,6 @@ COPY *.sln .
COPY Rnwood.Smtp4dev/*.csproj ./Rnwood.Smtp4dev/
RUN dotnet restore Rnwood.Smtp4dev

COPY Rnwood.Smtp4dev/npm-shrinkwrap.json ./Rnwood.Smtp4dev/
COPY Rnwood.Smtp4dev/package.json ./Rnwood.Smtp4dev/
WORKDIR /app/Rnwood.Smtp4dev
RUN npm install

# copy everything else and build app

WORKDIR /app
Expand All @@ -60,4 +55,4 @@ ENV ASPNETCORE_URLS=http://+:80 \
DOTNET_RUNNING_IN_CONTAINER=true

WORKDIR /dotnet
ENTRYPOINT ["dotnet", "/app/Rnwood.Smtp4dev.dll"]
ENTRYPOINT ["dotnet", "/app/Rnwood.Smtp4dev.dll"]
2 changes: 1 addition & 1 deletion Rnwood.Smtp4dev.Tests/E2E/E2ETests.cs
Expand Up @@ -142,7 +142,7 @@ private void RunE2ETest(Action<IWebDriver, Uri, int> test)

if (string.IsNullOrEmpty(mainModule))
{
mainModule = Path.GetFullPath("../../../../Rnwood.Smtp4dev/bin/Debug/netcoreapp2.2/Rnwood.Smtp4dev.dll");
mainModule = Path.GetFullPath("../../../../Rnwood.Smtp4dev/bin/Debug/netcoreapp3.1/Rnwood.Smtp4dev.dll");
}

CancellationToken timeout = new CancellationTokenSource(TimeSpan.FromSeconds(60)).Token;
Expand Down
2 changes: 0 additions & 2 deletions Rnwood.Smtp4dev.Tests/Rnwood.Smtp4dev.Tests.csproj
Expand Up @@ -10,8 +10,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />

<PackageReference Include="MailKit" Version="2.5.1" />
<PackageReference Include="MedallionShell" Version="1.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
Expand Down
9 changes: 2 additions & 7 deletions Rnwood.Smtp4dev/ApiModel/Message.cs
Expand Up @@ -99,20 +99,15 @@ private MessageEntitySummary HandleMimeEntity(MimeEntity entity)
Attachments = new List<AttachmentSummary>(),
Warnings = new List<MessageWarning>(),
Size = e.ToString().Length,
IsAttachment = (e.ContentDisposition?.Disposition != "inline" && !string.IsNullOrEmpty(fileName)) || e.ContentDisposition?.Disposition == "attachment",
MimeEntity = e
};
if (p != null)
{
p.ChildParts.Add(result);
bool isAttachment = (e.ContentDisposition?.Disposition != "inline" && !string.IsNullOrEmpty(fileName)) || e.ContentDisposition?.Disposition == "attachment";
if (isAttachment)
if (result.IsAttachment)
{
if (e.ContentDisposition?.Disposition != "attachment")
{
Expand Down
2 changes: 2 additions & 0 deletions Rnwood.Smtp4dev/ApiModel/MessageEntitySummary.cs
Expand Up @@ -22,6 +22,8 @@ public class MessageEntitySummary

public int Size { get; set; }

public bool IsAttachment{ get; set;}

[JsonIgnore]
internal MimeEntity MimeEntity { get; set; }
}
Expand Down
12 changes: 0 additions & 12 deletions Rnwood.Smtp4dev/ClientApp/components/app/app.ts

This file was deleted.

9 changes: 0 additions & 9 deletions Rnwood.Smtp4dev/ClientApp/components/app/app.vue.html

This file was deleted.

76 changes: 0 additions & 76 deletions Rnwood.Smtp4dev/ClientApp/components/confirmationdialog.ts

This file was deleted.

21 changes: 0 additions & 21 deletions Rnwood.Smtp4dev/ClientApp/components/confirmationdialog.vue.html

This file was deleted.

19 changes: 0 additions & 19 deletions Rnwood.Smtp4dev/ClientApp/components/headers.ts

This file was deleted.

13 changes: 0 additions & 13 deletions Rnwood.Smtp4dev/ClientApp/components/headers.vue.html

This file was deleted.

28 changes: 0 additions & 28 deletions Rnwood.Smtp4dev/ClientApp/components/home/home.ts

This file was deleted.

46 changes: 0 additions & 46 deletions Rnwood.Smtp4dev/ClientApp/components/home/home.vue.html

This file was deleted.

0 comments on commit 060da6f

Please sign in to comment.