|
| 1 | +<img alt="React Native Typescript Library Starter" src="assets/logo.png" width="1050"/> |
| 2 | + |
| 3 | +[](https://github.com/WrathChaos/react-native-typescript-library-starter) |
| 4 | + |
| 5 | +[](https://github.com/WrathChaos/react-native-typescript-library-starter) |
| 6 | + |
| 7 | +[](https://www.npmjs.com/package/react-native-typescript-library-starter) |
| 8 | +[](https://www.npmjs.com/package/react-native-typescript-library-starter) |
| 9 | + |
| 10 | +[](https://opensource.org/licenses/MIT) |
| 11 | +[](https://github.com/prettier/prettier) |
| 12 | + |
| 13 | +<p align="center"> |
| 14 | + <img alt="React Native Typescript Library Starter" |
| 15 | + src="assets/Screenshots/typescript.jpg" /> |
| 16 | +</p> |
| 17 | + |
| 18 | +## Library Usage |
| 19 | + |
| 20 | +- `npm i` |
| 21 | +- Delete example folder |
| 22 | +- Delete build folder |
| 23 | +- Make your own library into the `lib` folder |
| 24 | +- Change package.json |
| 25 | +- Change README for your own documentation |
| 26 | +- `npm run build` |
| 27 | + |
| 28 | +``` |
| 29 | +> react-native-typescript-library-starter@0.1.0 build /Users/kuray/Coursion/MyLibraries/ReactNative/react-native-typescript-library-starter |
| 30 | +> cd lib && tsc && cp ../package.json ../build/dist/ && Echo Build completed! |
| 31 | +
|
| 32 | +Build completed! |
| 33 | +``` |
| 34 | + |
| 35 | +- Test your build/dist into the new project |
| 36 | +- Finally, time to npm publish :) |
| 37 | + |
| 38 | +### Below part is for Documentation ! Remove above Library Usage |
| 39 | + |
| 40 | +# Installation |
| 41 | + |
| 42 | +Add the dependency: |
| 43 | + |
| 44 | +```bash |
| 45 | +npm i react-native-typescript-library-starter |
| 46 | +``` |
| 47 | + |
| 48 | +## Peer Dependencies |
| 49 | + |
| 50 | +<h5><i>IMPORTANT! You need install them</i></h5> |
| 51 | + |
| 52 | +```js |
| 53 | +"react": ">= 16.x.x", |
| 54 | +"react-native": ">= 0.55.x", |
| 55 | +``` |
| 56 | + |
| 57 | +# Usage |
| 58 | + |
| 59 | +## Import |
| 60 | + |
| 61 | +```jsx |
| 62 | +import MyComponent from "react-native-typescript-library-starter"; |
| 63 | +``` |
| 64 | + |
| 65 | +## Fundamental Usage |
| 66 | + |
| 67 | +```jsx |
| 68 | +<MyComponent /> |
| 69 | +``` |
| 70 | + |
| 71 | +## Example Project 😍 |
| 72 | + |
| 73 | +You can checkout the example project 🥰 |
| 74 | + |
| 75 | +Simply run |
| 76 | + |
| 77 | +- `npm i` |
| 78 | +- `react-native run-ios/android` |
| 79 | + |
| 80 | +should work of the example project. |
| 81 | + |
| 82 | +# Configuration - Props |
| 83 | + |
| 84 | +## Fundamentals |
| 85 | + |
| 86 | +| Property | Type | Default | Description | |
| 87 | +| ----------- | :----: | :-------: | --------------------- | |
| 88 | +| title | string | undefined | change the title | |
| 89 | +| description | string | undefined | change the descrition | |
| 90 | + |
| 91 | +## Customization (Optionals) |
| 92 | + |
| 93 | +| Property | Type | Default | Description | |
| 94 | +| -------------- | :-------: | :-------: | ---------------------------------------------------------------------- | |
| 95 | +| enableButton | boolean | false | let you enable the button (must use it for button) | |
| 96 | +| onPress | function | undefined | set your own logic for the button functionality when it is pressed | |
| 97 | +| buttonText | string | undefined | change the button's text | |
| 98 | +| style | ViewStyle | default | set or override the style object for the main container | |
| 99 | +| buttonStyle | ViewStyle | default | set or override the style object for the button style | |
| 100 | +| ImageComponent | Image | default | set your own component instead of default react-native Image component | |
| 101 | + |
| 102 | +## Future Plans |
| 103 | + |
| 104 | +- [x] ~~LICENSE~~ |
| 105 | +- [ ] Write an article about the lib on Medium |
| 106 | + |
| 107 | +# Change Log |
| 108 | + |
| 109 | +Change log will be here ! |
| 110 | + |
| 111 | +## Author |
| 112 | + |
| 113 | +FreakyCoder, kurayogun@gmail.com |
| 114 | + |
| 115 | +## License |
| 116 | + |
| 117 | +React Native Typescript Library Starter is available under the MIT license. See the LICENSE file for more info. |
0 commit comments