Skip to content

Commit

Permalink
Update docs and Makefile commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-the-coder committed Mar 4, 2024
1 parent b003a62 commit f4454b9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
16 changes: 14 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
ng run fastenhealth:storybook
make build-storybook
```


Expand Down
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
.PHONY: test
test: test-backend test-frontend

.PHONY: serve-frontend-storybook
serve-frontend-storybook:
.PHONY: build-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

.PHONY: serve-frontend
Expand Down Expand Up @@ -83,7 +87,6 @@ build-frontend-desktop-prod: dep-frontend
build-frontend-offline-sandbox: dep-frontend
cd frontend && yarn build -- -c offline_sandbox


.PHONY: test-frontend
# reduce logging, disable angular-cli analytics for ci environment
test-frontend: dep-frontend
Expand All @@ -98,7 +101,3 @@ test-frontend-coverage: dep-frontend
# reduce logging, disable angular-cli analytics for ci environment
test-frontend-coverage-ci: dep-frontend
cd frontend && npx ng test --watch=false --code-coverage --browsers=ChromeHeadlessCI

.PHONY: test-frontend-storybook
test-frontend-storybook:
cd frontend && ng run fastenhealth:storybook
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/out-tsc
# Only exists if Bazel was run
/bazel-out
/storybook-static

# dependencies
/node_modules
Expand Down

0 comments on commit f4454b9

Please sign in to comment.