1.0.1 • Published 6 years ago
react-native-ming-element v1.0.1
react-native-ming-element
Getting started
$ npm install react-native-ming-element --save
Mostly automatic installation
$ react-native link react-native-ming-element
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-ming-elementand addRNMingElement.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNMingElement.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNMingElementPackage;to the imports at the top of the file - Add
new RNMingElementPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-ming-element' project(':react-native-ming-element').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-ming-element/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-ming-element')
Windows
- In Visual Studio add the
RNMingElement.slninnode_modules/react-native-ming-element/windows/RNMingElement.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Ming.Element.RNMingElement;to the usings at the top of the file - Add
new RNMingElementPackage()to theList<IReactPackage>returned by thePackagesmethod
npm
$ npm version <update_type>
$ npm publish
\$ npm version 命令是用来自动更新版本号,update_type 取值有 patch minor major(https://www.jianshu.com/p/091a68ea1ca7)Usage
import RNMingElement from "react-native-ming-element";
// TODO: What to do with the module?
RNMingElement;