🎓 Javascript frontend for openstax tutor
CoffeeScript CSS Other
Latest commit 9daab34 Feb 17, 2017 @nathanstitt nathanstitt committed on GitHub Merge pull request #1598 from openstax/codecov-ignore
re-enable coverage of test directories

README.md

tutor-js

build status Coverage dependency status dev dependency status

The Front-end code for Openstax Tutor related projects

Install

  1. install nvm
    • run nvm install in this directory to install and use the correct version of node
    • Alternatively: manualy install the right version of node in ./.nvmrc
  2. npm install -g gulp to install gulp globally
  3. Git Clone this repository to the directory of your choice
    • If you don’t have git installed you can install homebrew and then brew install git
  4. cd tutor-js move into the checked out directory
  5. npm install
  6. npm run serve <project> (where <project is one of tutor|coach|exercises)
  7. Point your browser to http://localhost:8000 to use the mock data in /api

Development

  • npm run serve <project> starts up a local development webserver which rebuilds files when changed
  • npm test runs unit tests for all projects
  • npm run coverage generates a code coverage report
  • npm run build <project> archive builds minified files for production

Use PORT=8000 npm start to change the default webserver port.

After local updates are made:

  1. stop npm start
  2. npm install
  3. restart npm start

Pre-production

Before starting up vagrant, you can debug using a more production-like config by:

  1. gulp prod
  2. unzip /dist/archive.tar.gz into an assets/ directory
  3. serve the assets/ directory via NGINX or something with CORS enabled
  4. update the paths in tutor-server/conf/secrets.yml to point to http://localhost:[NGINX-PORT]/assets/tutor.min-####.css and tutor.min-####.js respectively
  5. in tutor-server run rails s
  6. go to http://localhost:3001