If you want to contribute to this project, here's a quick guide:
- Fork the repository
- Develop your code changes
- Ensure eslint is happy:
npm run lint - Ensure the tests pass:
npm test - Commit your changes
- Push to your fork
- Submit a pull request
- Name the file
[country].jsin Kebab case. For example:new-zealand.js - Use
Map of [Country]aslabel - Adjust the
viewBoxto have no empty space on each side (top, bottom, left, right) - Use English
names by default in[country].js - Create a specific
[country].[lang].jsfile to use another language. For example:taiwan.zh.js,france.fr.js... - Use semantic
ids (shortnames or full names in Kebab case). For example:nyfor New York,taipei-cityfor Taipei City... - Add the map in
/src/maps/ - Import and export the map in
/src/index.js
- Add a test in
/__tests__/svg-map.test.jsfor 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
- Add the country with the list of locations alphabetically sorted in the existing maps section