Skip to content

Commit b6fcd81

Browse files
authored
chore: Run 'yarn install' when building (#215)
I noticed when showing the development flow to a few engineers, there was one awkward step - you have to `cd site` and run `yarn install`, and then come back to root to `make build` or `./develop.sh` This just adds `yarn install` as part of `make build` and `./develop.sh` - so whichever one is run first will start work.
1 parent c44d036 commit b6fcd81

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto
7474
.PHONY: provisionersdk/proto
7575

7676
site/out:
77+
cd site && yarn install
7778
cd site && yarn build
7879
cd site && yarn export
7980
.PHONY: site/out

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@ This repository contains source code for Coder V2. Additional documentation:
1313
- [`semantic.yaml`](./github/semantic.yaml): Configuration for [semantic pull requests](https://github.com/apps/semantic-pull-requests)
1414
- `site`: Front-end UI code.
1515

16+
## Development
17+
18+
### Cloning
19+
20+
- `git clone https://github.com/coder/coder`
21+
- `cd coder`
22+
23+
### Building
24+
25+
- `make build`
26+
27+
### Development
28+
29+
- `./develop.sh`
30+
31+
The `develop.sh` script runs the server locally on port `3000`, and runs a hot-reload server for front-end code on `8080`.
32+
1633
## Front-End Plan
1734

1835
For the front-end team, we're planning on 2 phases to the 'v2' work:

develop.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ function create_initial_user() {
2121
http://localhost:3000/api/v2/user
2222
}
2323

24+
# Run yarn install, to make sure node_modules are ready to go
25+
yarn --cwd=./site install
26+
2427
# Do initial build - a dev build for coderd.
2528
# It's OK that we don't build the front-end before - because the front-end
2629
# assets are handled by the `yarn dev` devserver.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy