-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f3fc876
Showing
11 changed files
with
1,777 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['@react-native-community', 'plugin:@typescript-eslint/recommended'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
*.log | ||
lib/ | ||
*.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
printWidth: 100, | ||
bracketSpacing: false, | ||
arrowParens: 'avoid', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"non-interactive": true, | ||
"git": { | ||
"requireCleanWorkingDir": false | ||
}, | ||
"npm": { | ||
"publish": false | ||
}, | ||
"src": { | ||
"tagName": "v${version}" | ||
}, | ||
"github": { | ||
"release": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<img src="https://xxx-files.ggc.team/oss/if-component/if-component-readme.png" width="100%" title="Logo"> | ||
|
||
### Install it | ||
|
||
``` | ||
yarn add @kanzitelli/if-component | ||
``` | ||
|
||
### Use it | ||
|
||
```tsx | ||
import {If} from '@kanzitelli/if-component'; | ||
|
||
class OrdersScreen = () => { | ||
return ( | ||
<> | ||
<If _={loading} | ||
_then={<LoadingIndicator />} | ||
_else={<SomethingElse />} /> | ||
</> | ||
) | ||
} | ||
``` | ||
|
||
### TS lib starter | ||
|
||
```bash | ||
> git clone https://github.com/kanzitelli/if-component rn-lib | ||
> cd rn-lib && rm -rf .git | ||
> yarn | ||
``` | ||
|
||
Don't forget to change your lib's name in `package.json` and check other scripts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "rnn-layouts", | ||
"version": "0.1.0", | ||
"description": "🃏 Set of methods which help building initial layouts for RNN (react-native-navigation) without long boring code like {stack:component:{...}}. Also includes methods for screens registration and navigation between them.", | ||
"author": "Batyr ([email protected])", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"scripts": { | ||
"prebuild": "rm -rf lib", | ||
"build": "tsc && echo Build completed!", | ||
"postbuild": "prettier --write ./lib", | ||
"clean": "rm -rf ./node_modules ./package-lock.json && yarn", | ||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"format:check": "prettier --check ./src", | ||
"format:write": "prettier --write ./src", | ||
"release:github": "npm run build && dotenv release-it", | ||
"release:npm:public": "npm run build && npm publish --access public", | ||
"release:npm:private": "npm run build && npm publish", | ||
"publish:npm": "npm run build && npm publish", | ||
"publish:npm:next": "npm run build && npm publish --tag next" | ||
}, | ||
"keywords": [ | ||
"react", | ||
"react-native", | ||
"react-native-navigation", | ||
"rnn-layouts" | ||
], | ||
"peerDependencies": { | ||
"react": "*", | ||
"react-native": "*", | ||
"react-native-navigation": ">= 7.x.x" | ||
}, | ||
"devDependencies": { | ||
"@react-native-community/eslint-config": "^3.0.1", | ||
"@tsconfig/react-native": "^1.0.4", | ||
"@types/react": "^17.0.33", | ||
"dotenv-cli": "^4.0.0", | ||
"eslint": "^8.1.0", | ||
"prettier": "^2.4.1", | ||
"typescript": "^4.4.4" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"react-native-navigation": "^7.23.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import * as React from 'react'; | ||
import {Navigation} from 'react-native-navigation'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "@tsconfig/react-native/tsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": false, | ||
"rootDir": "src", | ||
"outDir": "lib", | ||
"declaration": true, | ||
"skipLibCheck": true, | ||
"module": "ES2020" | ||
}, | ||
"exclude": ["node_modules", "lib"] | ||
} |
Oops, something went wrong.