Supporting repo for the Cross Platform App Development at scale presentation by Addison Global. You can find the presentation slides here: http://slides.com/joaocamposribeiro/cross-platform-app-dev-demo
-
Install yarn package manager https://yarnpkg.com/en/docs/install
-
Install the project dependencies
yarn install
- Install all packages dependencies
yarn bootstrap
Runs the todo service backend which is required for the apps to function correctly
yarn backend
Starts the native app
cd apps/native-demo && yarn start
Starts the web app
cd apps/web-demo && yarn start
Validates the codebase against Addison Global frontend code standards
yarn lint
Typechecks the codebase using flow type
yarn typecheck
Exposes tasks related to the maintenance of the monorepo. Check LernaJS docs for more information: https://github.com/lerna/lerna#commands
# example to clean the node modules on each of the monorepos packages
yarn lerna clean
This project uses the base Javascript coding standards defined by Airbnb. Apart from those, we enforce a few other rules:
- (Error) 4 space indentation
- (Error) 120 chars for max line length
- (Warning) Maximum cyclomatic complexity of 3 - This is to flag potential code that could be prune to improvements on a PR level. All developers should take this into account and the code complexity should be kept under the limit unless a reasonable justification exists.
- No jsx file extension is required
Flowtype coding standards aim to provide a consistent and unified way to write both JS and type definitions respecting the same rules for comma dangles, spacing, etc. A few rules are worth explaining in more detail:
- no-weak-types Prevents the use of weak types - any, Object, Function - which cause flowtype to stop checking for type errors. This obviously undermines the value of using type checking and as such is discouraged. Type inference - __ - is recommended instead*. Currently only a warning is emitted and care should be taken during the review process.