Skip to content

Development Guidelines

Chia-Lo (Caleb) Hsu edited this page Apr 11, 2017 · 6 revisions

The following is a set of guidelines for development purposes.

Installation

  1. Install Git and NodeJS

  2. After cloning, install dependencies

    $ npm install
    
  3. Run development server

    $ npm start
    

Testing

All tests are located in the tests folder. They can be checked after pushing on TravisCI but preferably during development. To run,

  $ npm test

Pushing

  1. Review your own code!

    • console.logs
    • unused variables
  2. Check changes out on new branch

    $ git checkout -b yourBranchName
    
  3. Merge with dev branch to keep things updated

    $ git checkout dev
    $ git pull                                                               // get latest changes
    $ git checkout yourBranchName
    $ git merge dev                                                          
    
    • fix any merge conflicts
  4. Run tests

    $ npm test
    
  5. Check for linter errors

  6. Push to new remote branch

    $ git push origin yourBranchName
    
  7. Open new pull request

    • Request reviews from relevant people
    • Make sure it's on the dev branch
    • Fix things if tests aren't passing -- visit the CoMake TravisCI page for more details

Deployment

  1. Navigate to website/ directory
  2. Build files for production
    $ npm run build
    
    This part can take up to 9 minutes, so don't worry if the build hangs in the console.
  3. Test build locally at localhost:5000
    $ firebase serve
    
  4. Deploy to Firebase site
    $ firebase deploy
    
Clone this wiki locally