Skip to content

Commit

Permalink
chore: touch up README (#362)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Eagle <[email protected]>
  • Loading branch information
Mivr and alexeagle authored Sep 30, 2024
1 parent 7617be1 commit b51d51a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
39 changes: 23 additions & 16 deletions qwik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,36 @@ In this folder you will find a monorepo example of a Qwik app and a Qwik library

The app uses the library as an internal dependency. Using Bazel we can build and test both of them in parallel.

And using IBazel we can have a hot reload of the app when the library changes.
## About Bazel

## Commands:
See the [root README](/README.bazel.md) for general information about using Bazel in this monorepo.

### Build the example:
```
bazel build //qwik/...
```
## Developer Workflows

### Test the example:
```
### Run Tests

Do one of these:

```shell
# Test the app using typical JS commands
cd qwik/app; npm test
# Test the lib using typical JS commands
cd qwik/lib; npm test
# Use the Bazel CLI directly, testing all apps and libs
bazel test //qwik/...
```


### Start the hot reload app server:
```
ibazel run //qwik/app:devserver
```
* On Linux the hot reload works just once (see alternative below)
* On MacOS the hot reload works as expected
### Start the App

**With hot-reload**:

### For Linux you can use a slower approach like so (>5s for update):
```shell
cd qwik/app; npm run dev
```
ibazel run //qwik/app:start

**With vite restarting (>5s for update)**:

```shell
./tools/ibazel run //qwik/app:start
```
3 changes: 2 additions & 1 deletion qwik/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
"build": "bazel build //qwik/app/...",
"build.types": "tsc --incremental --noEmit",
"deploy": "echo 'Run \"npm run qwik add\" to install a server adapter'",
"dev": "ibazel run //qwik/app:devserver",
"dev": "../../tools/ibazel run //qwik/app:devserver",
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
"fmt": "prettier --write .",
"fmt.check": "prettier --check .",
"lint": "eslint \"src/**/*.ts*\"",
"preview": "qwik build preview && vite preview --open",
"start": "vite --open --mode ssr",
"test": "npm run test.unit",
"test.unit": "bazel test //qwik/app/...",
"test.unit.ui": "vitest --ui components",
"qwik": "qwik"
Expand Down
1 change: 1 addition & 0 deletions qwik/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"lint": "eslint \"src/**/*.ts*\"",
"release": "np",
"start": "vite --open --mode ssr",
"test": "npm run test.unit",
"test.unit": "bazel test //qwik/lib/...",
"test.unit.ui": "vitest --ui components",
"qwik": "qwik"
Expand Down

0 comments on commit b51d51a

Please sign in to comment.