Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 1.73 KB

commands.md

File metadata and controls

89 lines (67 loc) · 1.73 KB

Command Line Commands

Development

IOS

npm run ios

Android

npm run android

Starts the metro server running on http://localhost:8081

Reset

Reset react native cache

npm run reset

Generators

npm run generate

Allows you to auto-generate boilerplate code for common parts of your application, specifically components, and containers. You can also run npm run generate <part> to skip the first selection. (e.g. npm run generate container)

Testing

See the testing documentation for detailed information about our testing setup!

Unit testing

npm test

Tests your application with the unit tests specified in the **/tests/*.js files throughout the application. All the test commands allow an optional -- [string] argument to filter the tests run by Jest. Useful if you need to run a specific test only.

# Run only the Button component tests
npm test -- Button

Linting

npm run lint

Lints your JavaScript and your CSS.

npm run lint-fix

Lints your code and tries to fix any errors it finds.

npm run pretier-fix

Pretify your code and tries to fix any errors it finds.

Rename app

react-native-rename Rename your application to whatever you want. Beaware of the issue deleting your android files. Discard local git changes and move the files over to the new folder name location. android\app\src\main\java\

npx react-native-rename 'nameofapp'

Debugging

Android

npm run android-logging

IOS

npm run ios-logging