Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathChaos committed Sep 7, 2019
0 parents commit feb6fc0
Show file tree
Hide file tree
Showing 9 changed files with 239 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: "babel-eslint",
extends: "airbnb",
plugins: ["react", "react-native"],
env: {
jest: true,
"react-native/react-native": true
},
rules: {
// allow js file extension
"react/jsx-filename-extension": [
"error",
{
extensions: [".js", ".jsx"]
}
],
// for post defining style object in react-native
"no-use-before-define": ["error", { variables: false }],
// react-native rules
"react-native/no-unused-styles": 2,
"react-native/split-platform-components": 2,
"react-native/no-inline-styles": 2,
"react-native/no-raw-text": 2
}
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# OSX
#
.DS_Store

package-lock.json

node_modules

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Node Modules
**/node_modules
node_modules
# Example
example
# Assets
Assets
assets
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<img alt="React Native Library Boilerplate" src="https://github.com/WrathChaos/react-native-library-boilerplate/blob/master/assets/logo.png" width="1050"/>


[![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)


[![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)


[![npm version](https://img.shields.io/npm/v/@freakycoder/react-native-library-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-library-boilerplate)
[![npm](https://img.shields.io/npm/dt/@freakycoder/react-native-library-boilerplate.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-library-boilerplate)
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](https://github.com/prettier/prettier)

<p align="center">
<img alt="React Native Library Boilerplate" src="example-image-path-here" />
</p>

## Installation

Add the dependency:

### React Native:

```ruby
npm i react-native-library-boilerplate
```

## Peer Dependencies

###### IMPORTANT! You need install them.

```
"react": ">= 16.x.x",
"react-native": ">= 0.55.x",
```

# These are just example mock data

# Your Component Options

- Option 1 Component
- Option 2 Component

## Import

```js
import { Component1, Component2 } from "react-native-library-boilerplate";
```

# Component1 Usage

```js
<Component1 />
```


# Component2 Usage

```js
<Component2 />
```


### Configuration - Props

#### Note: These values are just example

| Property | Type | Default | Description |
| -------- | :-----: | :-----: | ------------------------------------------------------- |
| outline | boolean | true | make the button outline |
| solid | boolean | false | make the button with a solid background and a shadow |
| gradient | boolean | false | make the button with a gradient background and a shadow |
| width | number | 150 | change the button's width |


### ToDos

- [x] LICENSE
- [ ] Write an article about the lib on Medium

# Change Log

Change log will be here !

## Author

FreakyCoder, kurayogun@gmail.com

## License

React Native Library Boilerplate is available under the MIT license. See the LICENSE file for more info.
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions lib/src/components/NewComponent/NewComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";
import PropTypes from "prop-types";
import { Text, View } from "react-native";

const NewComponent = props => {
const { example } = props;
return (
<View>
<Text>{example}</Text>
</View>
);
};

NewComponent.propTypes = {
example: PropTypes.number
};

NewComponent.defaultProps = {
example: 5
};

export default NewComponent;
4 changes: 4 additions & 0 deletions lib/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import NewComponent from "./components/NewComponent/NewComponent";

export { NewComponent };
export default { NewComponent };
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "react-native-library-boilerplate",
"version": "0.0.1",
"description": "Description for library",
"keywords": [
"FreakyCoder",
"freakycoder",
"kuray",
"Kuray",
"react",
"react-native",
"javascript",
"ui-lib",
"rn"
],
"homepage": "https://www.freakycoder.com",
"bugs": "https://github.com/WrathChaos/react-native-library-boilerplate/issues",
"main": "./lib/src/index.js",
"repository": "git@github.com:WrathChaos/react-native-library-boilerplate.git",
"author": "Kuray (FreakyCoder) <kurayogun@gmail.com>",
"license": "MIT",
"peerDependencies": {
"react": ">= 16.x.x",
"react-native": ">= 0.55.x"
}
}

0 comments on commit feb6fc0

Please sign in to comment.