Skip to content

Commit 8152a0f

Browse files
FreakyCoderFreakyCoder
authored andcommitted
Initial commit
0 parents  commit 8152a0f

11 files changed

Lines changed: 243 additions & 0 deletions

File tree

.eslintrc.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
parser: "babel-eslint",
3+
extends: "airbnb",
4+
plugins: ["react", "react-native"],
5+
env: {
6+
jest: true,
7+
"react-native/react-native": true
8+
},
9+
rules: {
10+
// allow js file extension
11+
"react/jsx-filename-extension": [
12+
"error",
13+
{
14+
extensions: [".js", ".jsx"]
15+
}
16+
],
17+
// for post defining style object in react-native
18+
"no-use-before-define": ["error", { variables: false }],
19+
// react-native rules
20+
"react-native/no-unused-styles": 2,
21+
"react-native/split-platform-components": 2,
22+
"react-native/no-inline-styles": 2,
23+
"react-native/no-raw-text": 2
24+
}
25+
};

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
package-lock.json
6+
7+
node_modules
8+
9+
# Xcode
10+
#
11+
build/
12+
*.pbxuser
13+
!default.pbxuser
14+
*.mode1v3
15+
!default.mode1v3
16+
*.mode2v3
17+
!default.mode2v3
18+
*.perspectivev3
19+
!default.perspectivev3
20+
xcuserdata
21+
*.xccheckout
22+
*.moved-aside
23+
DerivedData
24+
*.hmap
25+
*.ipa
26+
*.xcuserstate
27+
project.xcworkspace
28+
29+
# Android/IntelliJ
30+
#
31+
build/
32+
.idea
33+
.gradle
34+
local.properties
35+
*.iml
36+
37+
# node.js
38+
#
39+
node_modules/
40+
npm-debug.log
41+
yarn-error.log
42+
43+
# BUCK
44+
buck-out/
45+
\.buckd/
46+
*.keystore
47+
48+
# fastlane
49+
#
50+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
51+
# screenshots whenever they are needed.
52+
# For more information about the recommended setup visit:
53+
# https://docs.fastlane.tools/best-practices/source-control/
54+
55+
*/fastlane/report.xml
56+
*/fastlane/Preview.html
57+
*/fastlane/screenshots
58+
59+
# Bundle artifact
60+
*.jsbundle

.npmignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Node Modules
2+
**/node_modules
3+
node_modules
4+
# Example
5+
example
6+
# Assets
7+
Assets
8+
assets

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 FreakyCoder
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<img alt="React Native Library Boilerplate" src="assets/logo.png" width="1050"/>
2+
3+
4+
[![Battle Tested ✅](https://img.shields.io/badge/-Battle--Tested%20%E2%9C%85-03666e?style=for-the-badge)](https://github.com/WrathChaos/react-native-library-boilerplate)
5+
6+
7+
[![React Native Library Boiler Plate](https://img.shields.io/badge/-React%20Native%20Library%20Boilerplate-lightgrey?style=for-the-badge)](https://github.com/WrathChaos/react-native-library-boilerplate)
8+
9+
10+
[![npm version](https://img.shields.io/npm/v/react-native-library-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-library-boilerplate)
11+
[![npm](https://img.shields.io/npm/dt/react-native-library-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-library-boilerplate)
12+
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)
13+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
14+
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](https://github.com/prettier/prettier)
15+
16+
<p align="center">
17+
<img alt="React Native Library Boilerplate"
18+
src="assets/Screenshots/JSLibraryBoilerplate.png" />
19+
</p>
20+
21+
# Installation
22+
23+
Add the dependency:
24+
25+
```ruby
26+
npm i react-native-library-boilerplate
27+
```
28+
29+
## Peer Dependencies
30+
31+
###### IMPORTANT! You need install them
32+
33+
```js
34+
"react": ">= 16.x.x",
35+
"react-native": ">= 0.55.x",
36+
```
37+
38+
# Usage
39+
40+
## Import
41+
42+
```js
43+
import { Component1, Component2 } from "react-native-library-boilerplate";
44+
```
45+
46+
## Component1 Usage
47+
48+
```js
49+
<Component1 />
50+
```
51+
52+
# Configuration - Props
53+
54+
| Property | Type | Default | Description |
55+
| -------- | :-----: | :-----: | ------------------------------------------------------- |
56+
| outline | boolean | true | make the button outline |
57+
| solid | boolean | false | make the button with a solid background and a shadow |
58+
| gradient | boolean | false | make the button with a gradient background and a shadow |
59+
| width | number | 150 | change the button's width |
60+
61+
## Future Plans
62+
63+
- [x] ~~LICENSE~~
64+
- [ ] Write an article about the lib on Medium
65+
66+
# Change Log
67+
68+
Change log will be here !
69+
70+
## Author
71+
72+
FreakyCoder, kurayogun@gmail.com
73+
74+
## License
75+
76+
React Native Library Boilerplate is available under the MIT license. See the LICENSE file for more info.
4.84 KB
Loading

assets/logo.png

15.6 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from "react";
2+
import PropTypes from "prop-types";
3+
import { Text, View } from "react-native";
4+
5+
const NewComponent = props => {
6+
const { example } = props;
7+
return (
8+
<View>
9+
<Text>{example}</Text>
10+
</View>
11+
);
12+
};
13+
14+
NewComponent.propTypes = {
15+
example: PropTypes.number
16+
};
17+
18+
NewComponent.defaultProps = {
19+
example: 5
20+
};
21+
22+
export default NewComponent;

lib/src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import NewComponent from "./components/NewComponent/NewComponent";
2+
3+
export { NewComponent };
4+
export default { NewComponent };

0 commit comments

Comments
 (0)