File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Intro
2
- Documentation for JsonApiDotNetCore is produced using [ DocFX ] ( https://dotnet.github.io/docfx/ ) from several files in this directory.
2
+ Documentation for JsonApiDotNetCore is produced using [ docfx ] ( https://dotnet.github.io/docfx/ ) from several files in this directory.
3
3
In addition, the example request/response pairs are generated by executing ` curl ` commands against the GettingStarted project.
4
4
5
5
# Installation
6
- Run the following command once to setup your system:
7
-
8
- ```
9
- npm install -g httpserver
10
- ```
6
+ You need to have 'npm' installed. Download Node.js from https://nodejs.org/ .
11
7
12
8
# Running
13
9
The next command regenerates the documentation website and opens it in your default browser:
Original file line number Diff line number Diff line change 1
1
# Requires -Version 7.0
2
2
3
3
# This script builds the documentation website, starts a web server and opens the site in your browser. Intended for local development.
4
- # It is assumed that you have already installed httpserver.
5
- # If that's not the case, run the next command:
6
- # npm install -g httpserver
7
4
8
5
param (
9
6
# Specify -NoBuild to skip code build and examples generation. This runs faster, so handy when only editing Markdown files.
@@ -16,6 +13,21 @@ function VerifySuccessExitCode {
16
13
}
17
14
}
18
15
16
+ function EnsureHttpServerIsInstalled {
17
+ if ((Get-Command " npm" - ErrorAction SilentlyContinue) -eq $null ) {
18
+ throw " Unable to find npm in your PATH. please install Node.js first."
19
+ }
20
+
21
+ npm list -- depth 1 -- global httpserver > $null
22
+
23
+ if ($LastExitCode -eq 1 ) {
24
+ npm install - g httpserver
25
+ }
26
+ }
27
+
28
+ EnsureHttpServerIsInstalled
29
+ VerifySuccessExitCode
30
+
19
31
if (-Not $NoBuild -Or -Not (Test-Path - Path _site)) {
20
32
Remove-Item _site - Recurse - ErrorAction Ignore
21
33
You can’t perform that action at this time.
0 commit comments