-
Notifications
You must be signed in to change notification settings - Fork 0
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 a28a393
Showing
569 changed files
with
40,605 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,84 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
*.hprof | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
!debug.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 | ||
|
||
# CocoaPods | ||
/ios/Pods/ | ||
|
||
# Ignite-specific items below | ||
# You can safely replace everything above this comment with whatever is | ||
# in the default .gitignore generated by React-Native CLI | ||
|
||
# VS Code | ||
.vscode | ||
|
||
# Expo | ||
.expo/* | ||
bin/Exponent.app | ||
|
||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
*.orig.* | ||
web-build/ | ||
|
||
# Configurations | ||
app/config/env.*.js | ||
!env.js |
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,6 @@ | ||
node_modules | ||
ios | ||
android | ||
.vscode | ||
ignite/ignite.json | ||
package.json |
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,24 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/solidaritySchema", | ||
"requirements": { | ||
"Node": [{ "rule": "cli", "binary": "node", "semver": ">=8.6.0" }], | ||
"Xcode": [ | ||
{ | ||
"rule": "cli", | ||
"binary": "xcodebuild", | ||
"version": "-version", | ||
"semver": ">=9.2.0", | ||
"platform": "darwin" | ||
} | ||
], | ||
"CocoaPods": [ | ||
{ | ||
"rule": "cli", | ||
"binary": "pod", | ||
"version": "--version", | ||
"semver": ">=1.7.0", | ||
"platform": "darwin" | ||
} | ||
] | ||
} | ||
} |
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,145 @@ | ||
# Welcome to your new ignited app! | ||
|
||
[![CircleCI](https://circleci.com/gh/infinitered/ignite.svg?style=svg)](https://circleci.com/gh/infinitered/ignite) | ||
|
||
## The latest and greatest boilerplate for Infinite Red opinions | ||
|
||
This is the boilerplate that [Infinite Red](https://infinite.red) uses as a way to test bleeding-edge changes to our React Native stack. | ||
|
||
Currently includes: | ||
|
||
- React Native | ||
- React Navigation | ||
- MobX State Tree | ||
- TypeScript | ||
- And more! | ||
|
||
## Quick Start | ||
|
||
The Ignite boilerplate project's structure will look similar to this: | ||
|
||
``` | ||
ignite-project | ||
├── app | ||
│ ├── components | ||
│ ├── i18n | ||
│ ├── utils | ||
│ ├── models | ||
│ ├── navigators | ||
│ ├── screens | ||
│ ├── services | ||
│ ├── theme | ||
│ ├── app.tsx | ||
├── storybook | ||
│ ├── views | ||
│ ├── index.ts | ||
│ ├── storybook-registry.ts | ||
│ ├── storybook.ts | ||
│ ├── toggle-storybook.tsx | ||
├── test | ||
│ ├── __snapshots__ | ||
│ ├── storyshots.test.ts.snap | ||
│ ├── mock-i18n.ts | ||
│ ├── mock-reactotron.ts | ||
│ ├── setup.ts | ||
│ ├── storyshots.test.ts | ||
├── README.md | ||
├── android | ||
│ ├── app | ||
│ ├── build.gradle | ||
│ ├── gradle | ||
│ ├── gradle.properties | ||
│ ├── gradlew | ||
│ ├── gradlew.bat | ||
│ ├── keystores | ||
│ └── settings.gradle | ||
├── ignite | ||
│ ├── ignite.json | ||
│ └── plugins | ||
├── index.js | ||
├── ios | ||
│ ├── IgniteProject | ||
│ ├── IgniteProject-tvOS | ||
│ ├── IgniteProject-tvOSTests | ||
│ ├── IgniteProject.xcodeproj | ||
│ └── IgniteProjectTests | ||
├── .env | ||
└── package.json | ||
``` | ||
|
||
### ./app directory | ||
|
||
Included in an Ignite boilerplate project is the `app` directory. This is a directory you would normally have to create when using vanilla React Native. | ||
|
||
The inside of the src directory looks similar to the following: | ||
|
||
``` | ||
app | ||
│── components | ||
│── i18n | ||
├── models | ||
├── navigators | ||
├── screens | ||
├── services | ||
├── theme | ||
├── utils | ||
└── app.tsx | ||
``` | ||
|
||
**components** | ||
This is where your React components will live. Each component will have a directory containing the `.tsx` file, along with a story file, and optionally `.presets`, and `.props` files for larger components. The app will come with some commonly used components like Button. | ||
|
||
**i18n** | ||
This is where your translations will live if you are using `react-native-i18n`. | ||
|
||
**models** | ||
This is where your app's models will live. Each model has a directory which will contain the `mobx-state-tree` model file, test file, and any other supporting files like actions, types, etc. | ||
|
||
**navigators** | ||
This is where your `react-navigation` navigators will live. | ||
|
||
**screens** | ||
This is where your screen components will live. A screen is a React component which will take up the entire screen and be part of the navigation hierarchy. Each screen will have a directory containing the `.tsx` file, along with any assets or other helper files. | ||
|
||
**services** | ||
Any services that interface with the outside world will live here (think REST APIs, Push Notifications, etc.). | ||
|
||
**theme** | ||
Here lives the theme for your application, including spacing, colors, and typography. | ||
|
||
**utils** | ||
This is a great place to put miscellaneous helpers and utilities. Things like date helpers, formatters, etc. are often found here. However, it should only be used for things that are truely shared across your application. If a helper or utility is only used by a specific component or model, consider co-locating your helper with that component or model. | ||
|
||
**app.tsx** This is the entry point to your app. This is where you will find the main App component which renders the rest of the application. | ||
|
||
### ./ignite directory | ||
|
||
The `ignite` directory stores all things Ignite, including CLI and boilerplate items. Here you will find generators, plugins and examples to help you get started with React Native. | ||
|
||
### ./storybook directory | ||
|
||
This is where your stories will be registered and where the Storybook configs will live. | ||
|
||
### ./test directory | ||
|
||
This directory will hold your Jest configs and mocks, as well as your [storyshots](https://github.com/storybooks/storybook/tree/master/addons/storyshots) test file. This is a file that contains the snapshots of all your component storybooks. | ||
|
||
## Running Storybook | ||
|
||
From the command line in your generated app's root directory, enter `yarn run storybook` | ||
This starts up the storybook server and opens a story navigator in your browser. With your app | ||
running, choose Toggle Storybook from the developer menu to switch to Storybook; you can then | ||
use the story navigator in your browser to change stories. | ||
|
||
For Visual Studio Code users, there is a handy extension that makes it easy to load Storybook use cases into a running emulator via tapping on items in the editor sidebar. Install the `React Native Storybook` extension by `Orta`, hit `cmd + shift + P` and select "Reconnect Storybook to VSCode". Expand the STORYBOOK section in the sidebar to see all use cases for components that have `.story.tsx` files in their directories. | ||
|
||
## Running e2e tests | ||
|
||
Read [e2e setup instructions](./e2e/README.md). | ||
|
||
## Previous Boilerplates | ||
|
||
- [2018 aka Bowser](https://github.com/infinitered/ignite-bowser) | ||
- [2017 aka Andross](https://github.com/infinitered/ignite-andross) | ||
- [2016 aka Ignite 1.0](https://github.com/infinitered/ignite-ir-boilerplate-2016) |
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,55 @@ | ||
# To learn about Buck see [Docs](https://buckbuild.com/). | ||
# To run your application with Buck: | ||
# - install Buck | ||
# - `npm start` - to start the packager | ||
# - `cd android` | ||
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` | ||
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck | ||
# - `buck install -r android/app` - compile, install and run application | ||
# | ||
|
||
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") | ||
|
||
lib_deps = [] | ||
|
||
create_aar_targets(glob(["libs/*.aar"])) | ||
|
||
create_jar_targets(glob(["libs/*.jar"])) | ||
|
||
android_library( | ||
name = "all-libs", | ||
exported_deps = lib_deps, | ||
) | ||
|
||
android_library( | ||
name = "app-code", | ||
srcs = glob([ | ||
"src/main/java/**/*.java", | ||
]), | ||
deps = [ | ||
":all-libs", | ||
":build_config", | ||
":res", | ||
], | ||
) | ||
|
||
android_build_config( | ||
name = "build_config", | ||
package = "com.exec", | ||
) | ||
|
||
android_resource( | ||
name = "res", | ||
package = "com.exec", | ||
res = "src/main/res", | ||
) | ||
|
||
android_binary( | ||
name = "app", | ||
keystore = "//android/keystores:debug", | ||
manifest = "src/main/AndroidManifest.xml", | ||
package_type = "debug", | ||
deps = [ | ||
":app-code", | ||
], | ||
) |
Oops, something went wrong.