Skip to content

Commit ddd5e2c

Browse files
FreakyCoderFreakyCoder
authored andcommitted
Initial commit
0 parents  commit ddd5e2c

76 files changed

Lines changed: 12704 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

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

.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

.prettierrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
bracketSpacing: true,
3+
jsxBracketSameLine: false,
4+
singleQuote: false,
5+
trailingComma: "all",
6+
tabWidth: 2,
7+
semi: true,
8+
};

README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<img alt="React Native Typescript Library Starter" src="assets/logo.png" width="1050"/>
2+
3+
[![Battle Tested ✅](https://img.shields.io/badge/-Battle--Tested%20%E2%9C%85-03666e?style=for-the-badge)](https://github.com/WrathChaos/react-native-typescript-library-starter)
4+
5+
[![React Native Typescript Library Starter](https://img.shields.io/badge/-Extremely%20easy%20to%20create%20a%20React%20Native%20Component%20Library%20with%20both%20Stateful%20and%20Functional%20Component%20Examples-orange?style=for-the-badge)](https://github.com/WrathChaos/react-native-typescript-library-starter)
6+
7+
[![npm version](https://img.shields.io/npm/v/react-native-typescript-library-starter.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-typescript-library-starter)
8+
[![npm](https://img.shields.io/npm/dt/react-native-typescript-library-starter.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-typescript-library-starter)
9+
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)
10+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
11+
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](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+
# Configuration - Props
72+
73+
| Property | Type | Default | Description |
74+
| -------- | :-----: | :-----: | ------------------------------------------------------- |
75+
| outline | boolean | true | make the button outline |
76+
| solid | boolean | false | make the button with a solid background and a shadow |
77+
| gradient | boolean | false | make the button with a gradient background and a shadow |
78+
| width | number | 150 | change the button's width |
79+
80+
## Future Plans
81+
82+
- [x] ~~LICENSE~~
83+
- [ ] Write an article about the lib on Medium
84+
85+
# Change Log
86+
87+
Change log will be here !
88+
89+
## Author
90+
91+
FreakyCoder, kurayogun@gmail.com
92+
93+
## License
94+
95+
React Native Typescript Library Starter is available under the MIT license. See the LICENSE file for more info.

assets/Screenshots/typescript.jpg

28.5 KB
Loading

assets/logo.png

15.6 KB
Loading

example/.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

example/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

0 commit comments

Comments
 (0)