Skip to content
No description, website, or topics provided.
TypeScript JavaScript Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore: require node >= 12 Sep 26, 2019
.github Use default name for PR template. We only need 1. Apr 9, 2019
.vscode feat: Deprecate tslint and eslint all the things. May 9, 2019
cypress Add right arrow to "Review" button. Oct 9, 2019
docs Disable zoom. Jun 11, 2019
prodserver added machine ID call Jul 20, 2019
public
src refactor: remove unused `Dictionary` type Oct 22, 2019
test refactor: use `Election` from `@votingworks/ballot-encoder` Oct 22, 2019
.env ESLint: install, config, run, and fix. Jan 17, 2019
.eslintignore feat: Deprecate tslint and eslint all the things. May 9, 2019
.eslintrc.js Tally: test coverage. Oct 7, 2019
.gitignore a simple production server that uses the existing proxy setup and ser… May 28, 2019
.node-version chore: require node >= 12 Sep 26, 2019
.prettierignore Prettier: install, config, run, and fix. Jan 17, 2019
.prettierrc.js feat: Deprecate tslint and eslint all the things. May 9, 2019
.stylelintrc-css.js Config and run stylelint correctly. May 11, 2019
.stylelintrc.js Config and run stylelint correctly. May 11, 2019
CONTRIBUTING.md Automate feedback from humans. Beep. Apr 8, 2019
LICENSE added license Dec 14, 2018
Makefile force the build when asking to build May 28, 2019
README.md CCD & Oxide credit Oct 23, 2019
cypress.json feat: landscape mode Sep 24, 2019
package.json chore(deps): bump @types/fetch-mock from 7.3.1 to 7.3.2 Nov 15, 2019
tsconfig.json Stricter types Sep 18, 2019
yarn.lock chore(deps): bump @types/fetch-mock from 7.3.1 to 7.3.2 Nov 15, 2019

README.md

VotingWorks Ballot Marking Device

Live Demo

The master branch of this repo is auto-deployed to:

Each pull request will have a unique demo url which can be found in the comments of the pull request.

Install and Run App Locally

This assumes you have git and yarn installed.

  1. Clone the repo:

    git clone https://github.com/votingworks/bmd.git
    
  2. Install dependencies:

    yarn install
    
  3. Run the app in your local browser:

    yarn start
    

Contributing

Hey, we’re stoked that you’d like to contribute. Please let us know how we can help you contribute.

  1. Fork this repo: https://github.com/votingworks/bmd

  2. Clone the repo locally:

    git clone https://github.com/YOUR_GITHUB_USERNAME/bmd.git
    

    Optionally, if you already cloned the main repo, you can update your local repo to have two remotes, votingworks for the main repo and origin for your fork:

    git remote rename origin votingworks
    git remote add origin https://github.com/YOUR_GITHUB_USERNAME/bmd.git
    
  3. Create a branch for the feature/bug/etc:

    git checkout -b name-of-your-branch
    
  4. Run the app:

    yarn start
    
  5. In a second console window, run the tests:

    yarn test
    

    Tests default to watch-mode: only tests related to changed code will run. Use the available commands in watch-mode to run the tests you want.

  6. Add features, fix bugs, etc. and then use git to commit your changes in logical commits.

    There is a pre-commit hook (see lint-staged in package.json) which will run linting and code formatting scripts. You can run these manually with these commands which are found in the package.json scripts:

    yarn lint
    yarn format
    

    Using Visual Studio Code? Autorun linting and code formatting by installing/enabling/disabling the following plugins (which will pick up the respective config files in this project):

    • disable TSLint as ESLint handles this functionality
    • install/enable ESLint for (ECMAScript) JavaScript linting
    • install/enable stylelint for modern CSS linting
    • install/enable Prettier - Code formatter for code formatting
  7. Check for test coverage. When you push your branch to github, CircleCI will run all the tests and check for test coverage. To check this yourself, run:

    yarn test:coverage
    

    In the root of the project there is a coverage directory. Open coverage/lcov-report/index.html in a browser to navigate the files to view test coverage.

  8. Push your branch to your fork on Github.

  9. Create a pull request to merge your branch into voingworks/bmd/master. Once the pull request is created CircleCI will automatically run all the tests to ensure the app is working correctly.

  10. The VotingWorks maintainers will

Local Development Scripts

  • yarn install - Install the dependencies.
  • yarn start - Run the app locally.
  • yarn test- Run tests in interactive mode.
  • yarn test:coverage - Run all tests and update test coverage report.

See package.json for all available scripts.

Technical Implementation

This project was bootstrapped with Create React App for TypeScript. It uses Styled Components for styles (and some css files too). ESLint is configured to lint Javascript and TypeScript files, and format code using Prettier. stylelint is used to lint modern css. Jest, dom-testing-library, react-testing-library, and Cypress are used to test components and end-to-end user flows.

Credits

Center for Civic Design and Oxide Design consulted on the initial design of this project. Thanks CCD and Oxide!

You can’t perform that action at this time.