Useful Commands
React-Native
Command | Description |
---|---|
npx react-native@latest init AwesomeProject | Creating a new application |
react-native run-android | run app on android |
react-native run-ios | run app on android |
react-native link [LIBRARY-NAME] | Link dependencies |
npm install babel-plugin-transform-decorators-legacy --save npm install babel-plugin-transform-class-properties --save | Install Babel for JSX |
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug cd android ./gradlew assembleDebug | apk in android/app/build/outputs/apk/app-debug.apk Create debug build |
react-native start # OR if you don't have react-native installed in the machine npx react-native start | Start Metro Server |
watchman watch-del-all | Watchman Clean |
react-native -v | react-native version |
npm view react-native version | actual react native version |
npm install | install project dependencies |
npm view react-scripts version | react-native script version |
npx react-native ram-bundle | Optimize the loading of the bundle by using the RAM format |
npx react-native bundle | JavaScript bundle for offline use: |
Flutter
Command | Description |
---|---|
flutter create my_app | Create an App |
flutter analyze -d <DEVICE_ID> | Analyze the Dart Code |
flutter run <DART_FILE> | Run a Dart file |
flutter pub get | Download Dependencies/Packages |
flutter pub update | Update Flutter packages |
flutter --help --verbose | Get Help |
flutter doctor | Check Project Health |
flutter version | Check Version |
flutter channel <CHANNEL_NAME> | Check Channels |
flutter build | Build the Project |
flutter devices -d <DEVICE_ID> | List Connected Devices |
flutter upgrade | Upgrade Flutter Version |
flutter assemble -o | Get necessary Packages for Project |
flutter downgrade | Downgrade Flutter/Dart SDKs |
flutter emulators | List available Emulators |
flutter install -d <DEVICE_ID | Install Flutter App on a Device |
flutter logs | View Terminal logs |
Cordova
Command | Description |
---|---|
cordova clean | clean project |
ionic cordova plugin list | see plugin list |
ionic cordova remove plugin-name | remove a plugin |
ionic cordova platform add android | add android platform |
ionic cordova platform add ios | add ios platform |
ionic cordova build android | build an app for android |
ionic cordova run android | run-app for android |
ionic cordova build ios | build an app for ios |
ionic cordova run-ios | run-app for ios |
ionic start myApp blank | create an app without tabs |
ionic start myApp tabs | create an app with tabs |
Capacitor
Command | Description |
---|---|
npm init @capacitor/app | New Capacitor app |
ionic integrations enable capacitor | Enable capacitor in Existing Project |
npm i @capacitor/app @capacitor/haptics @capacitor/keyboard @capacitor/status-bar | Install Capacitor Plugin Dependencies |
ionic capacitor add android ionic capacitor add ios | Add Platforms |
ionic cap run android -l --external | Run app with live reload (Android) |
ionic cap run ios -l --external | Run app with live reload (iOS) |
ionic capacitor copy android --prod && cd android && ./gradlew assembleRelease && cd .. | Generate a release APK without opening the android studio |
ionic capacitor copy android && cd android && ./gradlew assembleDebug && cd .. | Generate a debug APK without opening the android studio |
cordova-res --skip-config --copy | Generate icons & splash screen without specifying platform |
ionic capacitor copy android && cd android && ./gradlew assembleDebug && ./gradlew installDebug && cd .. | Build and run apk directly on the device from CLI |
Updated 4 months ago
What’s Next