rnc
react-native-component-cli
npm i react-native-component-cli
rnc

react-native-component-cli

⚡ scaffold a react native component within seconds

by Yuan Fu

2.0.1 (see all)License:MITTypeScript:Not Found
npm i react-native-component-cli
Readme

react-native-component-cli

Travis (.org) branch

Why?

Many repositories of react native component are not well structured and missing basic parts in CI / CD workflow including development setup, testing, lint... react-native-component-cli helps to instantly scaffold a react-native-component project with following features:

  1. Dev locally - Easy local dev with minimum dependencies
  2. Test - Fully test your component with Enzyme
  3. Lint - Lint source code with ready-to-go rules
  4. Stock - No unofficial 3rd Party Lib involved / Stock React Native Dev Experience

Install

by npx (Preferred)

If you are using an NPM version before 5.2.0, install npx with the following cmd

$ npm install npx -g

by npm install

$ npm install react-native-component-cli -g
$ npm install expo-cli -g

Usage

1. Create

by npx (Preferred)

$ npx react-native-component-cli create

by npm install

$ rnc create

render1562903344619

2. Install

$ cd path-to-your-react-native-component
$ npm install

3. Run Test

$ npm test

4. Start Dev / View Demo

$ npm start

Output

react-native-example-component
├── demo                // contains an Expo project for dev
│   ├── App.js          // the main file for develop the Expo project
│   ├── AppEntry.js     // the entry point for the Expo project
│   ├── app.json        // the Expo project config
│   └── metro.config.js // the metro bundler config
├── src                 // contains source file(s) for the component
│   └── index.js
├── test                // contains test file(s) for the component
│   └── index.test.js 
├── .eslintrc.js        // the eslint config for the component
├── babel.config.js     // the babel config for the test & Expo environments
├── setup-tests.js      // the jest-setup file for Enzyme
├── README.md           // README for the component
├── .gitignore          // git ignore for the component
└── package.json        // pacakge.json for the component

Roadmap

  • Upgrade to Expo SDK 33.0 ( React Native 0.59.8 & React 16.8.3 )
  • Upgrade to Expo SDK 35.0 ( React Native 0.59.8 & React 16.8.6 )
  • Upgrade to Expo SDK 36.0 ( React Native 0.61.4 & React 16.9.0 )

License

MIT

Downloads/wk

60

GitHub Stars

11

LAST COMMIT

2yrs ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

0

OPEN PRs

2
VersionTagPublished
2.0.1
latest
2yrs ago
No alternatives found
No tutorials found
Add a tutorial