This project calculates fun personal achievements based on observations recorded on iNaturalist.
https://wild-achievements.mywild.co.za
(or https://henrydelange.github.io/inat-achievements)
npm install
Downloads all dependencies.
npm start
Runs the React web application in development mode.
Open http://localhost:3000 to view it in the browser.
npm electron:start
Runs the Electron desktop client.
Depends on the main application to be running on http://localhost:3000 (via the npm start command).
npm run test
All tests are contained in the ./tests folder.
npm run build
Builds the app for production to the build folder.
Hosts this project using GitHub Pages.
The custom subdomain wild-achievements.mywild.co.za has been configured on GitHub, as specified in the CNAME file. As a result the homepage property is set in the package.json file should be http://HenryDeLange.github.io/ instead of http://HenryDeLange.github.io/inat-achievements when using the GitHub IO domain. However due to the Electron build the property is instead set to the ./ relative path.
The GitHub Action defined in ./.github/workflows/deploy-to-pages.yml will run automatically when code is committed into the master branch, resulting in a website of the latest code in the branch being available online on GitHub Pages.
- Make sure the
homepageproperty is set in thepackage.jsonfile as described above in the Custom Subdomain section. - Build the production version using the
npm run predeploycommand. - Deploy the application to GitHub Pages using the
npm run deploycommand.- This step will push the application's build artifacts to the
gh-pagesbranch.
- This step will push the application's build artifacts to the
- On GitHub, navigate to the repository's
Settingsand then make sure thatSourceproperty under thePagescategory is set to use thegh-pagesbranch. - The new version of the application should be online shortly. Done :)
Run this project as A desktop application using Electron.
The GitHub Action defined in ./.github/workflows/release-electron.yml will run automatically when code is committed into the master branch, resulting in the desktop application of the latest code in the branch being available as a GitHub Release.
- Make sure the
homepageproperty is set in thepackage.jsonfile as described above in the Custom Subdomain section.to the./relative path. - Run the npm script for the relevant environment.
- For example:
npm run electron:package:win
- For example:
- The distributable application will be in the
distfolder. Done :)
This website can be installed as a PWA via supported browsers. (Doing so will add a shortcut to this website on your device's home screen.)