mdw-components
mdw-components is a react-native component library.
Instructions
Installation
# Installs project
npm install mdw-components-v1
# Installs modules and pods in the example project
npm run pods
How to create a component
Components should be developed at the root of the project, in the src folder following this structure:
rootProject
│
└───src
│ │ index.tsx
│ └───components
│ │ index.ts
│ └───CompA
│ │ │ CompA.tsx
│ │ │ index.ts
│ │ │ ...
│ └───CompB
│ │ CompB.tsx
│ │ │ index.ts
│ │ ...
Then components should be imported in the relevant index files.
The example folder contains a blank react-native project in order to display the component under construction.
Command | Description |
---|---|
npm run pods | Updates node modules and pods in the example project |
npm run xc | Opens the example project in Xcode |
npm run install-lib | Bundles and installs the component under construction in the example project |
npm run cp-proto | Brings prototyped component in the src folder |
npm run cr-proto | Generate component boilerplate for starting building a new components |
npm run commit | Should be used to make commits |
# starts example project within Xcode
npm run xc
# bundles and install component
npm run install-lib --path=mdw-components.{version}.tgz
Version number should match with the package.json version number
Component documentation
Coming soon