The Interactive News team's guides to coding, designing and visualising.
- Clone this repository and run
- Start the development server:
- Open the URL (from the command output) in your browser.
You can then edit files within
./app while the dev server is running.
You can proxy the dev server through BrowserSync for automatic page reloads.
npm install -g browser-sync
Just run the site as usual using
npm start, then run the following command in a separate terminal tab:
$ browser-sync start --proxy "localhost:9000" --files "app/**/*"
Then open the local URL that BrowserSync prints out (usually
It's automatic: just edit code and push to the default branch, production.
Better still, do your work in a different branch and open a pull request – then, once Travis has reported that your changes are OK, merge it into production.
How it works: Whenever new code is pushed to the production branch, Travis will build it, commit the built
dist to master, and push this back to Github. (The master branch is what Github serves as the public website.)
Problems? Check the logs on Travis.
Note that Github Pages can be slow to update. But as long as you can see your changes in the master branch, they should appear eventually.
Debugging the live site
If everything works locally, but there are problems with the deployed website:
- Do a production build:
npm run build(this should create a
distdirectory, and should complete without error).
- Serve up the
distdirectory using srvlr or something similar.
- Debug away.