|Josh Habdas 59c2c969af docs(readme): update awesome rn link to avoid redirect||8 months ago|
|android||4 years ago|
|ios||3 years ago|
|src||3 years ago|
|.editorconfig||4 years ago|
|.eslintrc.js||3 years ago|
|.flowconfig||4 years ago|
|.gitignore||4 years ago|
|.snyk||3 years ago|
|.travis.yml||4 years ago|
|.watchmanconfig||4 years ago|
|Dockerfile||1 year ago|
|LICENSE||4 years ago|
|README.md||8 months ago|
|cover.jpg||1 year ago|
|package.json||3 years ago|
|webpack.config.js||3 years ago|
No Longer Maintained
This kit was originally used to build and ship, and later extracted from, Lumpen Radio early in the RN lifecycle. Since then there have been significant advances in RN tooling and, as a result, I recommend checking out some of the other Awesome React Native Boilerplates that’ve popped up lately. Have fun out there!
Build your React Native app with Webpack and Babel.
webpack-notifierfor desktop notifications on OS X
Clone repo and install dependencies once your environment is set-up:
git clone -o upstream -b master --single-branch \ https://github.com/jhabdas/react-native-webpack-starter-kit.git native-starter-kit && cd $_ && npm i
Once project cloned and dependencies installed, run it with:
This will start the React Packager and a Webpack Dev Server. The dev server will watch your JS files for changes, automatically linting your code as you iterate. Additionally, the dev server will generate the
index.[platform].js files expected by your React Native iOS or Android app, allowing you the freedom to build
Status: All systems go.
ios/App.xcodeproj in Xcode, build and run the project.
Unlike the app currently generated by
react-native init this app removes the
UIViewControllerBasedStatusBarAppearance key to prevent an App Store rejection I received submitting Lumpen Radio to the App Store. The key may be added back, if desired.
For information on HMR support for iOS see react-native-webpack-server/issues/103.
Status: Bug in simulator. Test on actual device instead.
For android development use the following:
npm run android-setup-port # Note that this option is available on devices running android 5.0+ (API 21) react-native run-android
If you run into any issues please see the Getting Started guide for React Native before submitting an issue.
This kit includes a
Dockerfile which can be used to create a virtualized development environment for building your app. To use it on Windows set-up Docker Machine then run the commands below with cmder (or similar) to get going. OS X users are encouraged to use dlite instead of Docker Machine for this setup.
.watchmanconfigto the following:
docker build --rm .command from the project root directory to build a virtualized Linunx environment configured for development using this starter kit.
docker imagesand looking for the most recently created image.
docker run -it 09608e4ec865 /bin/bash(where
09608e4ec865is the Image ID) and run the app with
As a minimalist seed this project does not introduce a testing framework. Instead it leverages simple static code analysis to help prevent coding mistakes and introduce some patterns for building React Native apps with ES2015 and ES7 with a functional mindset inspired by the Elm architecture and functional React alternatives like Deku.
Webpack is configured with a pre-loader to lint the application with ESLint using the Babel parser during app development. And the
npm lint command may be run at anytime to lint source code otherwise. See the
.eslintrc file to adjust linter rules to your liking. Or run
npm test to lint the application and scan its dependencies it for known security vulnerabilities.
To bundle the app for distribution for both iOS and Android:
npm run bundleto generate the offline JS bundle.
AppDelegate.mto load from pre-bundled file on disk.
Please see Submitting to App Store for instructions on iOS. If you have any good Android instructions, please send a PR this way. Good luck and have fun out there!