Skip to content

Commit

Permalink
Remove ServiceStack.Mvc
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Mar 1, 2024
1 parent d48df93 commit 5d5cc4b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
24 changes: 0 additions & 24 deletions MyApp/Configure.Ssg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,6 @@ public void Configure(IWebHostBuilder builder) => builder
pages.LoadFrom("_pages");
videos.LoadFrom("_videos");
blogPosts.LoadFrom("_posts");
},
afterAppHostInit: appHost =>
{
// prerender with: `$ npm run prerender`
AppTasks.Register("prerender", args =>
{
appHost.Resolve<MarkdownMeta>().RenderToAsync(
metaDir: appHost.ContentRootDirectory.RealPath.CombineWith("wwwroot/meta"),
baseUrl: HtmlHelpers.ToAbsoluteContentUrl("")).GetAwaiter().GetResult();

var distDir = appHost.ContentRootDirectory.RealPath.CombineWith("dist");
if (Directory.Exists(distDir))
FileSystemVirtualFiles.DeleteDirectory(distDir);
FileSystemVirtualFiles.CopyAll(
new DirectoryInfo(appHost.ContentRootDirectory.RealPath.CombineWith("wwwroot")),
new DirectoryInfo(distDir));

// Render .html redirect files
RazorSsg.PrerenderRedirectsAsync(appHost.ContentRootDirectory.GetFile("redirects.json"), distDir)
.GetAwaiter().GetResult();

var razorFiles = appHost.VirtualFiles.GetAllMatchingFiles("*.cshtml");
RazorSsg.PrerenderAsync(appHost, razorFiles, distDir).GetAwaiter().GetResult();
});
});
}

Expand Down
2 changes: 0 additions & 2 deletions MyApp/MyApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<ItemGroup>
<Using Include="MyApp" />
<Using Include="ServiceStack" />
<Using Include="ServiceStack.Mvc" />
</ItemGroup>

<ItemGroup>
Expand All @@ -32,7 +31,6 @@
<ItemGroup>
<PackageReference Include="ServiceStack" Version="8.*" />
<PackageReference Include="ServiceStack.Blazor" Version="8.*" />
<PackageReference Include="ServiceStack.Mvc" Version="8.*" />
<PackageReference Include="ServiceStack.OrmLite.Sqlite.Data" Version="8.*" />
<PackageReference Include="ServiceStack.Extensions" Version="8.*" />
<PackageReference Include="ServiceStack.Server" Version="8.*" />
Expand Down

0 comments on commit 5d5cc4b

Please sign in to comment.