Skip to content

lucianomlima/react-native-template-basic

Repository files navigation

React Native Basic App Template

A simple basic template to start a new React Native app with ESLint and custom scripts. Now supports React Native v0.57.x

Requirements

  • react-native-cli
  • yarn

Usage

Create a new project passing a template:

react-native init [ProjectName] --template basic-app

Wait for download dependencies. At finish run:

yarn start

To inject custom scripts and remove unnecessary files.

Includes

  • ESlint (extends Airbnb) v4.19.1
  • Husky v1.1.2
  • Lint Staged v7.3.0
  • Prettier v1.14.3
  • Flow v0.84.0

Custom Scripts

  • android:build - Generate Release APK
  • android:install - Run in Release mode
  • android:shake - Show DEV menu
  • ios:install - Run in Release mode
  • project:clean - Clean project
  • prettier:check - Check for unformatted files
  • prettier:all - Format files
  • lint - Run lint
  • start - Start Metro Bundler
  • start:clean - Start Metro Bundler without cache
  • test - Run jest
  • test:watch - Run jest in watch mode

Roadmap

  • Add Enzyme

Contributing

Clone this repo with git clone https://github.com/lucianomlima/react-native-template-basic react-native-template-basic-app cause npm needs project dir name to be equal to project name in package.json.

To execute the project with your changes, you can use the absolute path of cloned repo with react-native-cli:

react-native init [PROJECT_NAME] --template file:///path/to/repo

License

MIT

About

A simple React Native template with ESlint, Enzyme, Flow, Prettier and custom scripts

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •