Add make serve to serve static build. (#1574)

## Description

Add `make serve` to serve static build.

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Georgi Matev 2022-11-21 11:25:40 -08:00 committed by GitHub
parent 16a18cb3b4
commit 31db484ab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,4 @@
.PHONY: buildimage build dev shell check genclidocs _validatemdgen publish sync
.PHONY: buildimage build serve dev shell check genclidocs _validatemdgen publish sync
CORSO_BUILD_DIR := /tmp/.corsobuild
CORSO_BUILD_CACHE := ${CORSO_BUILD_DIR}/cache
@ -40,6 +40,9 @@ dockershell:
build: genclidocs
$(DOCSC) npm run build
serve:
$(DOCSC) npm run serve
genclidocs: _validatemdgen ${MDGEN_BINARY}
@echo 'Auto-generating Corso CLI docs...'
$(DOCSC) rm -rf docs/cli

View File

@ -41,6 +41,14 @@ make build
This command generates static content into the `build` directory for integration with any static contents hosting service.
## Serving static documentation
```bash
make serve
```
This command will serve the static content generated with `make build` at [http://localhost:3000](http://localhost:3000).
## Style and linting
```bash