ft-interactive/ft-interactive.github.io

Name: ft-interactive.github.io

Owner: FT Interactive News

Description: Docs: our team's handbook

Created: 2015-09-30 11:52:59.0

Updated: 2016-12-28 06:57:36.0

Pushed: 2017-03-13 10:48:04.0

Homepage: http://ft-interactive.github.io

Size: 342

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Developer guide Build Status

The Interactive News team's guides to coding, designing and visualising.

Go to the site

Quick start
  1. Clone this repository and run npm install
  2. Start the development server: npm start
  3. Open the URL (from the command output) in your browser.

You can then edit files within ./app while the dev server is running.

Use BrowserSync

You can proxy the dev server through BrowserSync for automatic page reloads.

To install: npm install -g browser-sync

Just run the site as usual using npm start, then run the following command in a separate terminal tab:

owser-sync start --proxy "localhost:9000" --files "app/**/*"

Then open the local URL that BrowserSync prints out (usually http://localhost:3000).

See BrowserSync's CLI options (and more details on the general options page).

Deploying

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:

  1. Do a production build: npm run build (this should create a dist directory, and should complete without error).
  2. Serve up the dist directory using srvlr or something similar.
  3. Debug away.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.