| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.
JavaScriptServices is a set of client-side technologies for ASP.NET Core. It provides infrastructure that you'll find useful if you:
Read Building Single Page Applications on ASP.NET Core with JavaScriptServices for more details.
This repo contains:
It's cross-platform (Windows, Linux, or macOS) and works with .NET Core 1.0.1 or later.
If you want to build a brand-new ASP.NET Core app that uses Angular / React / Knockout on the client, consider starting with the aspnetcore-spa generator. This lets you choose your client-side framework. It generates a starting point that includes applicable features such as Webpack dev middleware, server-side prerendering, and efficient production builds. It's much easier than configuring everything to work together manually!
To do this, install Yeoman and these generator templates:
npm install -g yo generator-aspnetcore-spa
Generate your new application starting point:
cd some-empty-directory yo aspnetcore-spa
Once the generator has run and restored all the dependencies, you can start up your new ASP.NET Core SPA:
dotnet run
For a more detailed walkthrough, see getting started with the aspnetcore-spa generator.
If you have an existing ASP.NET Core application, or if you just want to use the underlying JavaScriptServices packages directly, you can install these packages using NuGet and NPM:
There was previously a Microsoft.AspNetCore.ReactServices but this is not currently needed - all applicable functionality is in Microsoft.AspNetCore.SpaServices, because it's sufficiently general. We might add a new Microsoft.AspNetCore.ReactServices package in the future if new React-specific requirements emerge.
If you want to build a helper library for some other SPA framework, you can do so by taking a dependency on Microsoft.AspNetCore.SpaServices and wrapping its functionality in whatever way is most useful for your SPA framework.
Inside this repo, the templates directory contains the application starting points that the aspnetcore-spa generator emits. You can clone this repo and run those applications directly. But it's easier to use the Yeoman tool to run the generator.
The samples directory contains examples of:
To run the samples:
If you're interested in contributing to the various packages, samples, and project templates in this repo, that's great! You can run the code in this repo as follows:
If you're planning to submit a pull request, and if it's more than a trivial fix (for example, for a typo), it's usually a good idea first to file an issue describing what you're proposing to do and how it will work. Then you can find out if it's likely that such a pull request will be accepted, and how it fits into wider ongoing plans.
| Back | FazBrowse Home | New Git URL |