✨react-native-todolist-boilerplate✨
this is a todoList app ready-to-publish boilerplate for react-native web and android with redux,cypress,ts-firebase-rules,detox,rntl,paper and more. we used metro for native platforms and webpak for web(which has better support/documentions for web )
- ts-firebase-rules: which let you write firebase *.rules files with typescript
- cypress for web e2e testing + basic example
- detox for android e2e testing + basic example
- react-native-testing-library(rntl) for unit-testing + basic example
- Paper(as theme library) + useful Icons libraries
- react-router for routing both android and web
npm i
npm run start
-
web
npm run start
-
android
npm run start:android
- open an emulator
npm run android
-testing
- unit testing (with jest and react-native-testing-library)
- npm run test
- cypress(e2e testing)
- `npm run cy`
- detox(e2e testing)
this is the easiest way that i came up with to run detox tests
- first run your emulator
- then
modify "emulator.device.adbName" in ".detoxrc" and insert your emulator name
note: use `adb devices` to get list of available devices
- then `npm run android`
- then `npm run detox:buildForTheFirstTime `
- then `npm run detox:start`
or `npm run detox:start:debug` in case somethings not right
-note:dont forget to `adb reverse tcp:9101 tcp:9101` or any port you have changed in `firebase/firebase.json`
-
firebase
- install firebase cli -note: i tested these with firebase-tools(cli)9.10.2 ,node v12.14.1 and npm 6.13.4
- then
npm run firebase
-note:if you want to enable more of firebase features or modify ports, modifyfirebase/firebase.json
-
ts-firebase-rules(tsfr)
npm run tsfr:watch
-
build
- web :
npm run build
- android :
npm run build:android
- web :
note:to see full list of useful scripts check package.json "scripts" section.
✨✨✨✨✨✨