Skip to content

Commit 2f33a9a

Browse files
authored
yarn dev (mdn#1208)
1 parent a478d30 commit 2f33a9a

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

Procfile renamed to Procfile.dev

File renamed without changes.

Procfile.start

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server: yarn start:server
2+
web: yarn start:client

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,26 @@ To run Yari locally, you'll first need to install [git](https://git-scm.com/), [
1212
git clone https://github.com/mdn/yari.git
1313
cd yari
1414
yarn
15-
yarn start
15+
yarn dev
1616
open http://localhost:3000
1717

1818
If you prefer, you can fork the repo first and do the `git clone` with
1919
_your_ fork instead of the `mdn` one.
2020

21+
The `yarn dev` command will compile and prepare certain files. This always
22+
takes a little extra time. If you prefer you can use `yarn start` which
23+
will re-use any previously compiled files which is "riskier" but faster.
24+
The `yarn start` command will also start a server which doesn't automatically
25+
reload when its source code files change, so use with caution.
26+
2127
### How to stay up-to-date
2228

2329
Periodically, the code and the content changes. Make sure you're staying
2430
up-to-date with these commands:
2531

2632
git pull origin master
2733
yarn
28-
yarn start
34+
yarn dev
2935

3036
These are also good steps to always take when you embark on making a change.
3137
Then, the only extra command needed is `git checkout -b my-new-branch`

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
"build:ssr": "cd ssr && webpack --config webpack.config.js --mode=production",
1616
"prepare-build": "yarn build:client && yarn build:ssr",
1717
"build": "cd build && cross-env NODE_ENV=production node cli.js",
18-
"start": "yarn build:client && yarn build:ssr && nf start",
18+
"start": "(test -f client/build/index.html || yarn build:client) && (test -f ssr/dist/main.js || yarn build:ssr) && nf -j Procfile.start start",
19+
"dev": "yarn build:client && yarn build:ssr && nf -j Procfile.dev start",
1920
"start:client": "cd client && cross-env BROWSER=none PORT=3000 react-scripts start",
21+
"start:server": "node server",
2022
"start:dev-server": "nodemon server --watch server --watch build --watch content --watch kumascript",
2123
"start:static-server": "cross-env ENV_FILE=testing/.env node server/static.js",
2224
"filecheck": "cd filecheck && node cli.js"

0 commit comments

Comments
 (0)