Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.37 KB

CONTRIBUTING.md

File metadata and controls

33 lines (28 loc) · 1.37 KB

Contributing

If you want to contribute to this project, here's a quick guide:

  1. Fork the repository
  2. Develop your code changes
  3. Ensure eslint is happy: npm run lint
  4. Ensure the tests pass: npm test
  5. Commit your changes
  6. Push to your fork
  7. Submit a pull request

Creating a new map

Map file

  • Name the file [country].js in Kebab case. For example: new-zealand.js
  • Use Map of [Country] as label
  • Adjust the viewBox to have no empty space on each side (top, bottom, left, right)
  • Use English names by default in [country].js
  • Create a specific [country].[lang].js file to use another language. For example: taiwan.zh.js, france.fr.js...
  • Use semantic ids (shortnames or full names in Kebab case). For example: ny for New York, taipei-city for Taipei City...
  • Add the map in /src/maps/
  • Import and export the map in /src/index.js

Tests

  • Add a test in /__tests__/svg-map.test.js for this map: displays map of [Country] (in alphabetical order)
  • Update the snapshots with npm run build-tests
  • Run ESLint with npm run lint
  • Run the tests with npm test

Documentation

Reporting a bug

Open an issue.