Skip to content

Commit

Permalink
feat: v8 Maverick 🔥 (#1987)
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

🔥 Ignite version 8, code-named ("Maverick"), is the latest and largest update to the popular battle-tested React Native boilerplate. 🔥

Changes include:

* Massively Expanded Documentation
* Redesign
* Revamped Components
* Expo & Vanilla Unification
* Enhanced Internationalization Support
* New Splash Screen Generator
* New Icon Generator
* New Component Showroom
* New Drawer and Tab Bar Navigators
* New Login Screen / Auth Flow
* New Demo Podcast Screen
* New Debug Screen
* New Crash Reporting Interface
* Updated Error Boundary Component
* Updated MobX-State-Tree and Reactotron Integrations
* Added Reanimated 
* New Ignite CLI Walkthrough
* Enhanced Ignite CLI Experience
* New "Remove Demo" CLI Command
* Upgraded React Native and Expo
* Enabled Hermes by Default
* React Navigation Cleanup
* Faster CI / Tests
* Many bugfixes and DX improvements

Read all about it in our blog article!

https://shift.infinite.red/announcing-ignite-8-0-maverick-fbbdafbb738e
  • Loading branch information
jamonholmgren committed Sep 26, 2022
1 parent 1ffbeb1 commit b3d5b0d
Show file tree
Hide file tree
Showing 414 changed files with 14,137 additions and 22,174 deletions.
119 changes: 14 additions & 105 deletions .circleci/config.yml
Expand Up @@ -9,16 +9,11 @@ defaults: &defaults
- image: cimg/node:14.19
working_directory: /mnt/ramdisk/repo

# mac: &mac
# macos:
# xcode: "13.2.1"
# working_directory: ~/repo

version: 2.1
jobs:
tests:
<<: *defaults
parallelism: 4
resource_class: large
steps:
- checkout
- restore_cache:
Expand All @@ -45,107 +40,21 @@ jobs:
command: |
git config --global user.email "ci@infinite.red"
git config --global user.name "Infinite Red"
- restore_cache:
name: Restore ignite dependency cache
key: ignite-deps-cache-{{ .Environment.IGNITE_DEPS_PACKAGER }}-{{ checksum "boilerplate/package.json" }}-{{ arch }}-{{ .Environment.IGNITE_DEPS_KEY_SUFFIX }}
- run:
name: Install PNPM for tests
command: |
sudo chmod 777 /usr/local/bin
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
pnpm config set store-dir ../.pnpm-store
name: Run static tests
command: yarn format:check && yarn lint && yarn typecheck
- run:
name: Run tests
command: yarn ci:prep && yarn ci:test:vanilla && yarn clean
name: Run jest tests
command: yarn test
no_output_timeout: 5m

tests_expo:
<<: *defaults
steps:
- checkout
- restore_cache:
name: Restore node modules
keys:
- v1-dependencies-{{ checksum "package.json" }}-{{ arch }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Install dependencies
command: yarn install
- save_cache:
name: Save node modules
name: Save ignite dependency cache
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}-{{ arch }}
- run:
# We don't want to install CocoaPods on ubuntu where we run the tests.
name: Set up dummy `pod` command
command: |
sudo ln /bin/true /usr/local/bin/pod
- run:
name: Ensure git user is configured
command: |
git config --global user.email "ci@infinite.red"
git config --global user.name "Infinite Red"
- run:
name: Run tests
command: yarn ci:prep && yarn ci:test:expo && yarn clean
no_output_timeout: 8m

# detox:
# <<: *mac
# steps:
# - checkout
# - restore_cache:
# name: Restore node modules
# keys:
# - v1-dependencies-mac-{{ checksum "package.json" }}
# # fallback to using the latest cache if no exact match is found
# - v1-dependencies-mac-
# - run:
# name: Install dependencies
# command: |
# yarn install
# - save_cache:
# name: Save node modules
# paths:
# - node_modules
# key: v1-dependencies-mac-{{ checksum "package.json" }}
# - run:
# name: Install Detox CLI
# command: |
# sudo yarn global add detox-cli
# - run:
# name: Install Ruby and CocoaPods
# command: |
# sudo apt-get update &&
# sudo apt-get install ruby-full &&
# sudo gem install cocoapods --no-ri --no-rdoc
# - run:
# name: Install CocoaPods Specs
# command: |
# curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
# - run:
# name: Change Permissions
# command: sudo chown -R $(whoami) /Users/distiller/.config/
# - run:
# name: Install applesimutils
# command: brew tap wix/brew && brew install applesimutils
# - run:
# name: Install fbsimctl
# command: brew tap facebook/fb
# - run:
# name: Create temp directory
# command: mkdir tempApp
# - run:
# name: Ignite app
# command: cd tempApp && ignite new DetoxTests --detox --skip-git -b ../
# - run:
# name: Build Detox in ignited app
# command: cd tempApp/DetoxTests && yarn ci:build:e2e
# - run:
# name: Run detox tests in ignited app
# command: cd tempApp/DetoxTests && yarn ci:test:e2e
# - run:
# name: Remove temp directory
# command: rm -rf tempApp
- ~/.cache/ignite
key: ignite-deps-cache-{{ .Environment.IGNITE_DEPS_PACKAGER }}-{{ checksum "boilerplate/package.json" }}-{{ arch }}-{{ .Environment.IGNITE_DEPS_KEY_SUFFIX }}

publish:
<<: *defaults
Expand All @@ -158,6 +67,9 @@ jobs:
- v1-dependencies-{{ checksum "package.json" }}-{{ arch }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Build package
command: yarn build
# Run semantic-release after all the above is set.
- run:
name: Publish to npm
Expand All @@ -168,12 +80,9 @@ workflows:
test_and_release:
jobs:
- tests
- tests_expo
# - detox # disabled until we can figure out detox CircleCI problems
- publish:
requires:
- tests
- tests_expo
filters:
branches:
only: master
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Expand Up @@ -4,7 +4,7 @@ contact_links:
url: https://github.com/infinitered/ignite/discussions
about: For questions and discussion about ignite
- name: Slack Community
url: https://join.slack.com/t/infiniteredcommunity/shared_invite/zt-1f137np4h-zPTq_CbaRFUOR_glUFs2UA
url: https://community.infinite.red/
about: Check out our community for more real-time discussion
- name: Twitter Community
url: https://twitter.com/i/communities/1509407040095068166
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/enhancement.md
@@ -1,8 +1,7 @@
---
name: Enhancement
about: For ignite enhancement suggestions or feature request
title: ''
labels: 'enhancement'
assignees: ''
title: ""
labels: "enhancement"
assignees: ""
---

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,6 @@
## Please verify the following:

- [ ] `yarn ci:test` **jest** tests pass with new tests, if relevant
- [ ] `yarn test` **jest** tests pass with new tests, if relevant
- [ ] `README.md` has been updated with your changes, if relevant

## Describe your PR
2 changes: 2 additions & 0 deletions .prettierignore
@@ -0,0 +1,2 @@
/build
/boilerplate
92 changes: 52 additions & 40 deletions README.md
@@ -1,65 +1,66 @@
<p align="center"><img src="http://ir_public.s3.amazonaws.com/projects/ignite/ignite-bowser-launch-screen.png" alt="logo" width="414px"></p>
<p align="center"><img src="https://s3.amazonaws.com/ir_public/projects/ignite/ignite-maverick-home-screen.png" alt="logo" width="414px"></p>

# Ignite - the hottest React Native boilerplate
# Ignite - the battle-tested React Native boilerplate

<a href="https://badge.fury.io/js/ignite-cli" target="_blank"><img src="https://badge.fury.io/js/ignite-cli.svg" alt="npm version" height="20"></a>
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/infinitered/ignite/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/infinitered/ignite/tree/master)

## Battle-tested React Native boilerplate

The culmination of five years of constant React Native development, Ignite is the most popular React Native app boilerplate for both Expo and bare React Native.
The culmination of over six years of constant React Native development, Ignite is the most popular React Native app boilerplate for both Expo and bare React Native.

This is the React Native boilerplate that the [Infinite Red](https://infinite.red) team uses on a day-to-day basis to build client apps. Developers who use Ignite report that it saves them two to four weeks of time on average off the beginning of their React Native project!

_NOTE: Ignite CLI version 8.0 is now in beta -- check it out in the `maverick` branch!_

## Tech Stack

Ignite apps include the following rock-solid technical decisions out of the box:

- React Native
- React Navigation 6
- MobX-State-Tree [(Why not Redux?)](https://github.com/infinitered/ignite/blob/master/docs/MobX-State-Tree.md)
- MobX-React-Lite
- TypeScript
- AsyncStorage (integrated with MST for restoring state)
- apisauce (to talk to REST servers)
- Flipper-ready
- Reactotron-ready (and pre-integrated with MST)
- Supports Expo (and Expo web) out of the box
- And more!
Nothing makes it into Ignite unless it's been proven on projects that Infinite Red works on. Ignite apps include the following rock-solid technical decisions out of the box:

| Library | Category | Version | Description |
| ----------------- | -------------------- | ------- | ---------------------------------------------- |
| React Native | Mobile Framework | v0.69 | The best cross-platform mobile framework |
| React | UI Framework | v18 | The most popular UI framework in the world |
| TypeScript | Language | v4 | Static typechecking |
| React Navigation | Navigation | v6 | Performant and consistent navigation framework |
| MobX-State-Tree | State Management | v5 | Observable state tree |
| MobX-React-Lite | React Integration | v3 | Re-render React performantly |
| Expo | SDK | v46 | Allows (optional) Expo modules |
| Expo Font | Custom Fonts | v10 | Import custom fonts |
| Expo Localization | Internationalization | v13 | i18n support (including RTL!) |
| Expo Status Bar | Status Bar Library | v1 | Status bar support |
| RN Reanimated | Animations | v2 | Beautiful and performant animations |
| AsyncStorage | Persistence | v1 | State persistence |
| apisauce | REST client | v2 | Communicate with back-end |
| Flipper | Debugger | | Native debugging |
| Reactotron RN | Inspector/Debugger | v2 | JS debugging |
| Hermes | JS engine | | Fine-tuned JS engine for RN |
| Jest | Test Runner | v26 | Standard test runner for JS apps |
| Detox | Testing Framework | v19 | Graybox end-to-end testing |
| date-fns | Date library | v2 | Excellent date library |

Ignite also comes with a [component library](https://github.com/infinitered/ignite/blob/master/docs/Components.md) that is tuned for custom designs, theming support, testing, custom fonts, generators, and much, much more.

[Check out the documentation!](https://github.com/infinitered/ignite/blob/master/docs)

## Quick Start

Prerequisites:

- For [Expo-powered React Native apps](https://expo.io/), no prerequisites are necessary ([why choose Expo?](https://medium.com/@adhithiravi/building-react-native-apps-expo-or-not-d49770d1f5b8))
- For vanilla React Native, make sure you're set up for React Native by following our free Infinite Red Academy course [for macOS](https://academy.infinite.red/p/installing-react-native-tutorial-on-macos) or [for Windows 10](https://academy.infinite.red/p/installing-react-native-tutorial-on-windows-10) first
- For vanilla React Native, make sure you're set up for React Native by following [the official documentation](https://reactnative.dev/docs/environment-setup).

Run the CLI:

```bash
# for vanilla React Native
npx ignite-cli new PizzaApp
# or for Expo-powered:
npx ignite-cli new PizzaApp --expo
# to provide a custom bundle identifier (Android only):
npx ignite-cli new PizzaApp --bundle=com.infinitered.pizzaapp
```
# Get walked through the prompts for the different options to start your new app
npx ignite-cli@next new PizzaApp

Ignite will walk you through the rest.
# Accept all the recommended defaults and get straight to coding!
npx ignite-cli@next new PizzaApp --yes
```

Once you're up and running, check out our new [Getting Started Guide](https://github.com/infinitered/ignite/blob/master/docs/Guide.md) guide or the rest of our [docs](https://github.com/infinitered/ignite/blob/master/docs).

If you'd like to follow a tutorial, check out [this one from Robin Heinze](https://shift.infinite.red/creating-a-trivia-app-with-ignite-bowser-part-1-1987cc6e93a1).

### Troubleshooting

The above commands may fail with various errors, depending on your operating system and dependency versions. Some troubleshooting steps to follow:

- Make sure you are using the LTS version of Node. This can be checked via the `node --version` command. If you require multiple Node versions on your system, install `nvm`, and then run `nvm install --lts`. At the time of writing, Node LTS is v16.x.x.
- If the installation fails because of an Xcode error (missing Xcode command line tools), the easiest way to install them is to run `sudo xcode-select --install` in your terminal.
- If Xcode and command line tools are already installed, but the installation complains about missing patch dependencies, you may need to switch the Xcode location to something else: `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`
If you'd like to follow a tutorial, check out [this one from Robin Heinze](https://shift.infinite.red/creating-a-trivia-app-with-ignite-bowser-part-1-1987cc6e93a1). _Note that this was created for a previous version of Ignite -- we are working on updating it!_

## Generators

Expand All @@ -71,25 +72,36 @@ npx ignite-cli generate --help

...will give you information on what generators are present. To learn more, check out our [Generators](https://github.com/infinitered/ignite/blob/master/docs/Generators.md) documentation.

## Troubleshooting
### Troubleshooting

If you run into problems, first search the issues in this repository. If you don't find anything, you can come talk to our friendly and active developers in the Infinite Red Community Slack ([community.infinite.red](http://community.infinite.red)).
The above commands may fail with various errors, depending on your operating system and dependency versions. Some troubleshooting steps to follow:

- Uninstall global versions of the Ignite CLI via `npm uninstall -g ignite-cli` and use the CLI via `npx ignite-cli`
- Make sure you are using a reasonably recent version of Node. This can be checked via the `node --version` command. If you require multiple Node versions on your system, install `nvm`, and then run `nvm install --lts`. At the time of writing, Node LTS is v16.x.x.
- If the installation fails because of an Xcode error (missing Xcode command line tools), the easiest way to install them is to run `sudo xcode-select --install` in your terminal.
- If Xcode and command line tools are already installed, but the installation complains about missing patch dependencies, you may need to switch the Xcode location to something else: `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`
- Opening the project in Xcode can give you other insights into what's happening: `open ./ios/<yourapp>.xcworkspace`
- Add the `--debug` switch to the Ignite CLI new command to provide additional output during project initialization

Note:

- Navigation persistence is OFF by default in production.
- Error boundary is set to 'always' display by default.

## Reporting Bugs / Getting Help

If you run into problems, first search the issues and discussions in this repository. If you don't find anything, you can come talk to our friendly and active developers in the Infinite Red Community Slack ([community.infinite.red](http://community.infinite.red)).

## No time to learn React Native? Hire Infinite Red for your next project

We get it – sometimes there just isn’t enough time on a project to learn the ins and outs of a new framework. Infinite Red’s here to help! Our experienced team of React Native engineers have worked with companies like Microsoft, Zoom, and Mercari to bring even some of the most complex projects to life.
We get it – sometimes there just isn’t enough time on a project to learn the ins and outs of a new framework. Infinite Red’s here to help! Our experienced team of React Native engineers have worked with companies like GasBuddy, Zoom, and Mercari to bring even some of the most complex projects to life.

Whether it’s running a full project or training a team on React Native, we can help you solve your company’s toughest engineering challenges – and make it a great experience at the same time.

Ready to see how we can work together? [Send us a message](mailto:hello@infinite.red)

## Further Reading

- Watch Jamon Holmgren's talk at React Live Amsterdam where he uses Ignite to build an app in less than 30 minutes: [https://www.youtube.com/watch?v=OgiFKMd_TeY](https://www.youtube.com/watch?v=OgiFKMd_TeY)
- Prior art includes [Ignite Andross](https://github.com/infinitered/ignite-andross) and [Ignite Bowser](https://github.com/infinitered/ignite-bowser) (which is very similar to the current version of Ignite).
- [Check out Gluegun](https://github.com/infinitered/gluegun) - Ignite CLI is powered by Gluegun, which lets you build CLI apps painlessly!
- [Who are We?](https://infinite.red) - Learn More About Infinite Red
9 changes: 5 additions & 4 deletions boilerplate/.gitignore
Expand Up @@ -20,6 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local

# Android/IntelliJ
#
Expand Down Expand Up @@ -49,9 +50,10 @@ buck-out/
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

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

# Bundle artifact
*.jsbundle
Expand Down Expand Up @@ -80,5 +82,4 @@ npm-debug.*
web-build/

# Configurations
app/config/env.*.js
!env.js
15 changes: 15 additions & 0 deletions boilerplate/App.js
@@ -0,0 +1,15 @@
// This is the entry point if you run `yarn expo:start`
// If you run `yarn ios` or `yarn android`, it'll use ./index.js instead.
import App from "./app/app.tsx"
import React from "react"
import { registerRootComponent } from "expo"
import * as SplashScreen from "expo-splash-screen"

SplashScreen.preventAutoHideAsync()

function IgniteApp() {
return <App hideSplashScreen={SplashScreen.hideAsync} />
}

registerRootComponent(IgniteApp)
export default IgniteApp

0 comments on commit b3d5b0d

Please sign in to comment.