Skip to content

greggraf/5calls

 
 

Repository files navigation

5calls

This is where development of the 5calls.org frontend happens. Please check the issue list, pull requests and contributor guidelines before starting work so we can ensure you're not duplicating work! We're all volunteers and want to treat the time you dedicate to the site with respect. Ping @make5calls on Twitter with your email to get an invite to our Slack.

Table of Contents

Development

To make display changes, you likely won't need to handle the application server, and can instead rely on the production version of 5calls, running at 5calls.org -- more on this below.

The front end is written in Javascript using the Choo framework. The application server back end -- for data processing -- is written in Go.

5calls requires Node.js and Go version 1.7+. If you are on a Mac you'll need to install XCode and the CLI tools as well.

Front End

Front end requirements must first be installed with:

npm install

To start developing:

npm start

This command will:

  • compile front end static assets
  • spin up an HTTP server for serving the site files on port tcp/8000.
  • watch and recompile front end files when any changes are detected

To package assets for deployment:

npm run deploy

This command also builds the assets, applies additional transforms on the assets (such as minification of the JavaScript sources), but does not watch for changes.

To turn on/off debug mode, which adds some reset buttons throughout the interface, run the following in your console:

localStorage['org.5calls.debug'] = 'true' // turn on debug mode
localStorage['org.5calls.debug'] = 'false' // turn off debug mode

Application Server

If you'd like to help us work on the backend code as well (written in Go), please reach out to join our Slack!

Quality Assurance

JavaScript Unit Tests

JavaScript unit tests are written using Mocha and Chai and run in the Karma test runner. You must have the Google Chrome browser installed to run them.

Run the unit tests with:

npm test

If you are working on JavaScript code, you can make the tests automatically re-run whenever you change a relevant file with:

npm run test:watch

End-to-end Integration Tests

End-to-end (e2e) integration testing is done using Selenium with Mocha and Chai using the WebdriverJS API.

To run the e2e tests:

  1. Start the front end application in a command window with the npm start command.
  2. In a second command window run the tests using the command npm run test:e2e.

JavaScript Linting

Linting of the 5 Calls JavaScript code is done using ESLint with rules defined in .eslintrc.json. The following command runs ESLint: gulp eslint

Contributor Guidelines

For the guide to contributing to this repository, please see CONTRIBUTING.md file.

Contributors

Other Client Projects

About

Frontend for the 5calls.org site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.3%
  • HTML 7.9%
  • CSS 5.7%
  • Makefile 0.1%