Skip to content

Commit

Permalink
yarn dev (#1208)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe authored Sep 2, 2020
1 parent a478d30 commit 2f33a9a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions Procfile.start
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server: yarn start:server
web: yarn start:client
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,26 @@ To run Yari locally, you'll first need to install [git](https://git-scm.com/), [
git clone https://github.com/mdn/yari.git
cd yari
yarn
yarn start
yarn dev
open http://localhost:3000

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

The `yarn dev` command will compile and prepare certain files. This always
takes a little extra time. If you prefer you can use `yarn start` which
will re-use any previously compiled files which is "riskier" but faster.
The `yarn start` command will also start a server which doesn't automatically
reload when its source code files change, so use with caution.

### How to stay up-to-date

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

git pull origin master
yarn
yarn start
yarn dev

These are also good steps to always take when you embark on making a change.
Then, the only extra command needed is `git checkout -b my-new-branch`
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
"build:ssr": "cd ssr && webpack --config webpack.config.js --mode=production",
"prepare-build": "yarn build:client && yarn build:ssr",
"build": "cd build && cross-env NODE_ENV=production node cli.js",
"start": "yarn build:client && yarn build:ssr && nf start",
"start": "(test -f client/build/index.html || yarn build:client) && (test -f ssr/dist/main.js || yarn build:ssr) && nf -j Procfile.start start",
"dev": "yarn build:client && yarn build:ssr && nf -j Procfile.dev start",
"start:client": "cd client && cross-env BROWSER=none PORT=3000 react-scripts start",
"start:server": "node server",
"start:dev-server": "nodemon server --watch server --watch build --watch content --watch kumascript",
"start:static-server": "cross-env ENV_FILE=testing/.env node server/static.js",
"filecheck": "cd filecheck && node cli.js"
Expand Down

0 comments on commit 2f33a9a

Please sign in to comment.