First you need to install all the dependencies of the project with command npm install
.
Browser - To run on browser, run command npm start
.
Android - To run on android, you may need the following softwares installed and added to environment variables.
- JDK 8
- Gradle
- Android Studio / SDKManager
You can run a regular react development live server with command :
npm run react
* Cordova plugins will not work this way
To build use npm run build
which will build the react project and transfer it to 'www' folder for cordova.
To build and then run the project, use commands:
- Android -
npm run ba
(will start an emulator if android phone is not connected correctly). - Browser -
npm run bb
ornpm start
.
To run the project after a build was made, use commands:
- Android -
npm run a
(will start an emulator if android phone is not connected correctly). - Browser -
npm run b
.