A demo project to explore React development.
Based on react-native-web-sketch-boilerplate. See there for details on the finer points of the setup.
- To explore React API's when targeting multiple platforms.
- The application is intended to share as much code a possible between platforms, be that Native on iOS or Android, or Browsers on the web.
- The application should be responsive to viewport changes regardless of
- platform, and its UI should be adaptive to the accepted standard for each platform.
The project uses some ES7 features and proposals such as arrow functions, rest/spread (...) and function bind (::). Babel is used to transpile.
Terms are use are defined in the MIT License
The following scripts are provided:
-
npm run iosBuild app and start the iOS Simulator using the Expo app. Will watch for code changes and reload when needed
-
npm run androidBuild app and start the Android Simulator using the Expo app. Will watch for code changes and reload when needed (untested)
-
npm run webBuild app and run in browser using Webpack Dev Server and Hot Module Reloading
-
npm run sketchBuild and run app in Sketchapp (MacOS Only), watch for changes and reload when needed
-
npm run test:webRun tests for web and common components
-
npm run test:nativeRun tests for native and common components
-
npm run native:startStart the React Native packager only
-
npm run native:ejectEject the React Native project
-
npm run sketch:buildBuild only for Sketch target
-
npm run sketch:watchSame as
sketch -
npm run sketch:render:onceBuilds for Sketch and renders once, doesn't watch.
-
npm run webpack:buildBuild only for webpack
-
npm run webpackRun webpack dev server, open in browser, hot module replacement enabled
-
npm run expressRun express server with hot module replacement enabled, uses localhost:3000
-
npm run lintRuns eslint on all the entire project
-
npm run flowRuns Flow type checking on the entire project
-
npm run precommitRuns lint and tests for currently staged modules. See 'git hooks' for more.
The package uses husky to run commands on certain git actions (git hooks).
Lint-staged is used to simplify identification of staged files and run the appropriate commands.
-
Pre Commit
Before committing, flowtype, linting and tests are run on the currently staged files.