Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mauriciord/rn-ts-boilerplate
Boilerplate of React Native with Typescript and Jest
https://github.com/mauriciord/rn-ts-boilerplate
boilerplate react-native template typescript
Last synced: 4 months ago
JSON representation
Boilerplate of React Native with Typescript and Jest
- Host: GitHub
- URL: https://github.com/mauriciord/rn-ts-boilerplate
- Owner: mauriciord
- Created: 2019-03-22T03:24:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T05:00:20.000Z (about 2 years ago)
- Last Synced: 2024-10-12T19:32:33.467Z (4 months ago)
- Topics: boilerplate, react-native, template, typescript
- Language: Objective-C
- Size: 3.19 MB
- Stars: 19
- Watchers: 4
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Native TS Template
This project is a template using React Native and Typescript.
## Using it
```
npx react-native init YourProjectName --template mard-rn-tscd YourProjectName
node first-setup
```## Configuring
Insert this scripts at your `package.json`:
```json
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"android": "react-native run-android",
"android:apk": "cd android && ./gradlew assembleRelease",
"android:install": "adb install android/app/build/outputs/apk/app-release.apk",
"clear": "node node_modules/react-native/local-cli/cli.js start --reset-cache",
"devtools": "react-devtools",
"ios": "react-native run-ios",
"lint": "tslint --project tsconfig.json",
"lint:staged": "lint-staged",
"postversion": "react-native-version",
"bump:stable-release": "NEXT_STABLE=\"$(semver $npm_package_version -i release)\"; npm version $NEXT_STABLE",
"bump:stable-major": "NEXT_STABLE=\"$(semver $npm_package_version -i major)\"; npm version $NEXT_STABLE",
"bump:stable-minor": "NEXT_STABLE=\"$(semver $npm_package_version -i minor)\"; npm version $NEXT_STABLE",
"bump:stable-patch": "NEXT_STABLE=\"$(semver $npm_package_version -i patch)\"; npm version $NEXT_STABLE",
"bump:beta-release": "NEXT_BETA=\"$(semver $npm_package_version -i prerelease --preid beta)\"; npm version $NEXT_BETA",
"bump:beta-major": "NEXT_BETA=\"$(semver $npm_package_version -i premajor --preid beta)\"; npm version $NEXT_BETA",
"bump:beta-minor": "NEXT_BETA=\"$(semver $npm_package_version -i preminor --preid beta)\"; npm version $NEXT_BETA",
"bump:beta-patch": "NEXT_BETA=\"$(semver $npm_package_version -i prepatch --preid beta)\"; npm version $NEXT_BETA"
```## Git hooks
The project is using Husky to add some **Git hooks**.
### Husky commit msgs
It's very simple to use, see:
```
git commit -m "prefix: your beautiful message here"
```The **prefixes** are:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test### Before commit
As a `pre-commit`, it's using a `lint:staged` (lint-staged), that format code using prettier.