Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 2.56 KB

CONTRIBUTING.md

File metadata and controls

56 lines (38 loc) · 2.56 KB

Contributing

Development

To run this project locally:

git clone git@github.com:alulsh/family-tree-map.git
cd family-tree-map
npm install
npm run dev

This will start a Parcel development server in watch mode at http://localhost:1234.

Dependencies

This project uses the following production dependencies:

Tests

Run npm test to run tests locally. This project runs tests automatically on every commit using GitHub Workflows.

This project uses Jest for tests with a minimal Babel configuration for compatibility with Parcel. Since this project loads Mapbox GL JS through the Mapbox CDN instead of bundling with Parcel, the Jest tests mock Mapbox GL JS using the global object in the test set up file.

This project uses eslint with the Airbnb JavaScript style guide for code quality and Prettier for code formatting.

If you're using Visual Studio Code, you can add the following to your .vscode/settings.json file for this project to enable automatic linting and formatting on save:

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}

Deployment

This project is hosted on GitHub Pages using the gh-pages branch. Parcel bundles all files to a local dist directory, which we push to the gh-pages branch. You can view the deployment at https://www.alexandraulsh.com/family-tree-map/.

This project runs the npm run build command automatically on every commit using GitHub Workflows to catch any potential build errors.

To deploy updates to GitHub Pages:

npm run build
npm run deploy