Update docs and Makefile commands
This commit is contained in:
parent
b003a62c1c
commit
f4454b9cac
|
@ -239,9 +239,21 @@ curl -H "Authorization: Bearer ${JWT_TOKEN_HERE}" http://localhost:5984/_session
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
# Run Component Storybook
|
# How do I work with Storybook?
|
||||||
|
|
||||||
|
[Storybook](https://storybook.js.org) allows development and testing of frontend components in isolation.
|
||||||
|
When running the Storybook server, each defined story can be viewed and interacted with on it's own allowing for defining and testing of various states and conditions.
|
||||||
|
|
||||||
|
In order to run the Storybook server, run the following command and open the url provided:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ng run fastenhealth:storybook
|
make serve-storybook
|
||||||
|
```
|
||||||
|
|
||||||
|
If you only want to verify that all stories build properly (a check that is run on commits and PRs), you can run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make build-storybook
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -7,8 +7,12 @@
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: test-backend test-frontend
|
test: test-backend test-frontend
|
||||||
|
|
||||||
.PHONY: serve-frontend-storybook
|
.PHONY: build-storybook
|
||||||
serve-frontend-storybook:
|
build-storybook: dep-frontend
|
||||||
|
cd frontend && ng run fastenhealth:build-storybook
|
||||||
|
|
||||||
|
.PHONY: serve-storybook
|
||||||
|
serve-storybook: dep-frontend
|
||||||
cd frontend && ng run fastenhealth:storybook
|
cd frontend && ng run fastenhealth:storybook
|
||||||
|
|
||||||
.PHONY: serve-frontend
|
.PHONY: serve-frontend
|
||||||
|
@ -83,7 +87,6 @@ build-frontend-desktop-prod: dep-frontend
|
||||||
build-frontend-offline-sandbox: dep-frontend
|
build-frontend-offline-sandbox: dep-frontend
|
||||||
cd frontend && yarn build -- -c offline_sandbox
|
cd frontend && yarn build -- -c offline_sandbox
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test-frontend
|
.PHONY: test-frontend
|
||||||
# reduce logging, disable angular-cli analytics for ci environment
|
# reduce logging, disable angular-cli analytics for ci environment
|
||||||
test-frontend: dep-frontend
|
test-frontend: dep-frontend
|
||||||
|
@ -98,7 +101,3 @@ test-frontend-coverage: dep-frontend
|
||||||
# reduce logging, disable angular-cli analytics for ci environment
|
# reduce logging, disable angular-cli analytics for ci environment
|
||||||
test-frontend-coverage-ci: dep-frontend
|
test-frontend-coverage-ci: dep-frontend
|
||||||
cd frontend && npx ng test --watch=false --code-coverage --browsers=ChromeHeadlessCI
|
cd frontend && npx ng test --watch=false --code-coverage --browsers=ChromeHeadlessCI
|
||||||
|
|
||||||
.PHONY: test-frontend-storybook
|
|
||||||
test-frontend-storybook:
|
|
||||||
cd frontend && ng run fastenhealth:storybook
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
/out-tsc
|
/out-tsc
|
||||||
# Only exists if Bazel was run
|
# Only exists if Bazel was run
|
||||||
/bazel-out
|
/bazel-out
|
||||||
|
/storybook-static
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
/node_modules
|
||||||
|
|
Loading…
Reference in New Issue