This repository has been archived and is not active any more since the content has been moved to the mono repo https://github.com/guardian/dotcom-rendering
- Clone the repo
- Make sure you're using Node 12 (specific version found in
.nvmrc
) - Install dependencies:
npm install
Before you start get mobile
Janus credentials (ask someone if you're unsure what this means)
This is the simplest way to get started, but will intermingle all the logs together in one shell. If you're doing development work it might be easier to run the client and server in separate shells as described in the next subsection.
npm run watch
View in a browser at http://localhost:8080 (standard port for webpack-dev-server)
Note: You will need to refresh the page to see any changes you make to the server code. Any changes to client code should reload automatically.
This will output each command's logs to different shells, which can make development easier.
To start the server:
npm run watch:server
To start the client:
npm run watch:client
View in a browser at http://localhost:8080 (standard port for webpack-dev-server)
Note: You will need to refresh the page to see any changes you make to the server code. Any changes to client code should reload automatically.
You may need to build the client-side code first with:
npm run build:client
Then start the server with:
npm run watch:server
View in a browser at http://localhost:3040
Note: You will need to refresh the page to see any changes you make to the server code. If you change the client code you will need to rebuild it with the first command mentioned in this subsection.
The unit tests are built using Jest. They can be run with the following command:
npm run test
ESLint is used to validate the code. It can be run like this:
npm run lint
It can automatically fix problems for you:
npm run lint:fix
A good way to see components and test them in isolation is to run storybook:
npm run storybook
Stories are deployed on GitHub pages
In order to release the models you'll need to:
- have a bintray account with access to the guardian organisation
- have an NPM account, part of the @guardian org with a configured token
Make sure you set upstream git push --set-upstream origin <BRANCH_NAME>
In the SBT repl:
clean
project scalaApiModels
release
project tsApiModels
releaseNpm <versionNumber>