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 11# 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.
33In addition, the example request/response pairs are generated by executing ` curl ` commands against the GettingStarted project.
44
55# 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/ .
117
128# Running
139The next command regenerates the documentation website and opens it in your default browser:
Original file line number Diff line number Diff line change 11# Requires -Version 7.0
22
33# 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
74
85param (
96 # 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 {
1613 }
1714}
1815
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+
1931if (-Not $NoBuild -Or -Not (Test-Path - Path _site)) {
2032 Remove-Item _site - Recurse - ErrorAction Ignore
2133
You can’t perform that action at this time.
0 commit comments