You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+19-12Lines changed: 19 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,11 @@ This project is part of ASP.NET Core. You can find samples, documentation and ge
6
6
7
7
## What is this?
8
8
9
-
`JavaScriptServices` is a set of technologies for ASP.NET Core developers. It provides infrastructure that you'll find useful if you use Angular 2 / React / Knockout / etc. on the client, or if you build your client-side resources using Webpack, or otherwise want to execute JavaScript on the server at runtime.
9
+
`JavaScriptServices` is a set of client-side technologies for ASP.NET Core. It provides infrastructure that you'll find useful if you:
10
+
11
+
- Use Angular 2 / React / Knockout / etc. <!-- do we need on the client? -->
12
+
- Build your client-side resources using Webpack.
13
+
- Execute JavaScript on the server at runtime.
10
14
11
15
This repo contains:
12
16
@@ -22,22 +26,22 @@ This repo contains:
22
26
* A Yeoman generator that creates preconfigured app starting points ([guide](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/))
23
27
* Samples and docs
24
28
25
-
Everything here is cross-platform, and works with .NET Core 1.0.1 or later on Windows, Linux, or OS X.
29
+
It's cross-platform (Windows, Linux, or macOS) and works with .NET Core 1.0.1 or later.
26
30
27
31
## Creating new applications
28
32
29
-
If you want to build a brand-new ASP.NET Core app that uses Angular 2 / React / Knockout on the client, consider starting with the `aspnetcore-spa` generator. This lets you choose your client-side framework, and 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!
33
+
If you want to build a brand-new ASP.NET Core app that uses Angular 2 / 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!
30
34
31
-
To do this, first install Yeoman and these generator templates:
35
+
To do this, install Yeoman and these generator templates:
32
36
33
37
npm install -g yo generator-aspnetcore-spa
34
38
35
-
Then you can generate your new application starting point:
39
+
Generate your new application starting point:
36
40
37
41
cd some-empty-directory
38
42
yo aspnetcore-spa
39
43
40
-
Finally, once the generator has run and restored all the dependencies, you can start up your new ASP.NET Core Single Page Application:
44
+
Once the generator has run and restored all the dependencies, you can start up your new ASP.NET Core SPA:
41
45
42
46
dotnet run
43
47
@@ -56,23 +60,26 @@ If you have an existing ASP.NET Core application, or if you just want to use the
56
60
* Find [documentation and usage examples here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#microsoftaspnetcorespaservices).
57
61
*`Microsoft.AspNetCore.AngularServices`
58
62
* This builds on the `SpaServices` package and includes features specific to Angular 2. Currently, this includes validation helpers and a "cache priming" feature, which let you pre-evaluate ajax requests on the server so that client-side code doesn't need to make network calls once it's loaded.
59
-
* The code is [here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.AngularServices), and you'll find a usage example for [the validation helper here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts), and for the [cache priming here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/Views/Home/Index.cshtml#L7-8). Full docs are to be written.
63
+
* The code is [here](https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.AngularServices), and you'll find a usage example for [the validation helper here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts), and for the [cache priming here](https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/Views/Home/Index.cshtml#L7-8). Complete documentation is planned. <!-- can we link to an issue? -->
60
64
61
65
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.
62
66
63
67
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.
64
68
65
69
## Samples and templates
66
70
67
-
Inside this repo, [the `templates` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/templates) contains the application starting points that the `aspnetcore-spa` generator emits. If you want, you can clone this repo and run those applications directly. But it's easier to [use the Yeoman tool to run the generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/).
71
+
Inside this repo, [the `templates` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/templates) 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](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/).
72
+
73
+
The [`samples` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/samples) contains examples of:
68
74
69
-
Also in this repo, [the `samples` directory](https://github.com/aspnet/JavaScriptServices/tree/dev/samples) contains examples of using the JavaScript services family of packages with Angular 2 and React, plus examples of standalone `NodeServices` usage for runtime code transpilation and image processing.
75
+
- Using the JavaScript services family of packages with Angular 2 and React.
76
+
- A standalone `NodeServices` usage for runtime code transpilation and image processing.
70
77
71
78
**To run the samples:**
72
79
73
80
* Clone this repo
74
81
* At the repo's root directory (the one containing `src`, `samples`, etc.), run `dotnet restore`
75
-
* Change directory to the sample you want to run (e.g., `cd samples/angular/MusicStore`)
82
+
* Change directory to the sample you want to run (for example, `cd samples/angular/MusicStore`)
76
83
* Restore Node dependencies by running `npm install`
77
84
* If you're trying to run the Angular 2 "Music Store" sample, then also run `gulp` (which you need to have installed globally). None of the other samples require this.
78
85
* Run the application (`dotnet run`)
@@ -84,8 +91,8 @@ If you're interested in contributing to the various packages, samples, and proje
84
91
85
92
* Cloning the repo
86
93
* Running `dotnet restore` at the repo root dir
87
-
* Going to whatever sample or template you want to run (e.g., `cd templates/Angular2Spa`)
94
+
* Going to whatever sample or template you want to run (for example, `cd templates/Angular2Spa`)
88
95
* Restoring NPM dependencies (run `npm install`)
89
96
* Launching it (`dotnet run`)
90
97
91
-
If you're planning to submit a pull request, and if it's more than a trivial fix (e.g., 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.
98
+
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.
0 commit comments