Understand and reduce your carbon footprint 🌱 iOS & Android.
Repository for the NMF.earth React Native application, built with Expo, Redux Toolkit and Typescript.
Running the app:
$ yarn start
For starting the app on a specific OS:
$ yarn ios | yarn android
Copy the 2 files that contain secrets and replace them with yours
$ cp app.example.json app.json $ cp secret.example.ts secret.ts
Eslint is used in the project to enforce code style and should be configured in your editor.
Prettier is also used and apply automatically by eslint
Typescript is used in the project for type-checking and should be configured in your editor.
You can check this manually by running:
$ yarn lint
$ yarn typescript
You can ask eslint to fix issues by running:
$ yarn lint:fix
Use the following command to run unit tests with coverage:
$ yarn test
Use the following to update unit tests
$ yarn test -u
Use the following to run unit tests in watch mode while developing:
$ yarn test --watch
Stories (*.story.tsx) can be automatically added to
$ yarn prestorybook
To place new
guidesfolder or modify existing guide and then run
node scripts/generate-guides.jsto generate a new sustainable guide. Images can be used in the
![Earth](earth.png)and should be place in
Same for methodology screen, just run
node scripts/generate-methodology.jsto update
You can help us with translate the app with our online tool POEditor.
So far the app supports English, French, German, Swedish, Danish, Russian, Portugal, Polish.
node scripts/generate-translation-files.jsin order to create the files needed for the new language you want to add to the app.
node scripts/poeditor/group-translation-files.jsto generate 1 JSON file per language, with all the translation vars in it. From there, you can easily make any edit you want. When you're done, you can run
node scripts/poeditor/spread-translation-files.jsto merge your edits and spread them into all the translation files across the repo.
Any tag starting with
vwill runs expo publish. During this step
app.example.jsonis used to generate an
app.jsonfile for expo's deployment, this is done with the following script
More than 25 developers have contribute to the app, thanks a lot to them!
Have a look to contributing.md if you want to contribute!
Repository and contributions are under GNU General Public License v3.0