From f9ac0e6f8c6345b334f880db9d0be2afb0ac6f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastiaan?= <se_bastiaan@outlook.com> Date: Sun, 10 Dec 2017 17:27:13 +0100 Subject: [PATCH] Update README and add yarn script shortcuts to package.json --- .gitlab-ci.yml | 2 +- README.md | 37 ++++++++++++++++++++----------------- package.json | 11 +++++++++-- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 877e0885..156786b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ stages: eslint: stage: validate script: - - yarn ci-lint + - yarn lint:ci jest: stage: validate diff --git a/README.md b/README.md index a18f68cd..1a0e4ca8 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,26 @@ -[](https://dashboard.buddybuild.com/apps/59b91aadba233f000121b9d3/build/latest?branch=master) -# ThaliApp +Thalia Website +============== + The new and improved ThaliApp -# Installation -## Requirements -* [Node](https://nodejs.org/en/) (Some package managers might ship versions that are too old) -* [Yarn](https://yarnpkg.com/) -* Android development environment set up according to [this guide](https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment) +Android: [](https://dashboard.buddybuild.com/apps/59b91aadba233f000121b9d3/build/latest?branch=master) +iOS: [](https://dashboard.buddybuild.com/apps/59b56f51ff3d3c000160a8fa/build/latest?branch=master) + + +Getting started +--------------- -## Setup -`yarn install` +0. Get at least the latest [Node](https://nodejs.org/en/) LTS version +1. Install the [Yarn](https://yarnpkg.com/) package manager +2. Set up the Android (and/or if you're running macOS: iOS) development environment using [this guide](https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment) +3. Clone this repository +4. Run `yarn install` to get all the required dependencies +5. Start the development server using `yarn start` +6. Deploy the app on a running emulator or connected Android device by running `yarn start:android` -## Starting the app on your phone -Ensure that the development server is started with `yarn run react-native start`. -Deploy the app on a running emulator or connected Android Phone with `yarn run react-native run-android`. -## Starting the app in your browser -Run `webpack` -Open index.html +Logging and debugging +--------------- -## Debugging -Open the console with `yarn run react-native log-android`. +Reading the basic logs is easy, you can run `yarn log:android` or `yarn log:ios` to oen the standard log output in your terminal. +Follow [this guide](https://facebook.github.io/react-native/docs/debugging.html) for more advanced debugging. diff --git a/package.json b/package.json index df3443b3..a0e83006 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,16 @@ "version": "0.0.1", "private": true, "scripts": { - "start": "node node_modules/react-native/local-cli/cli.js start", + "start": "react-native start", + "start:ios": "react-native run-ios", + "start:android": "react-native run-android", + "log:ios": "react-native log-ios", + "log:android": "react-native log-android", "lint": "eslint *.js app --fix", - "ci-lint": "eslint *.js app" + "lint:ci": "eslint *.js app", + "test": "jest", + "test:watch": "jest --watch", + "coverage": "jest --coverage" }, "jest": { "preset": "react-native", -- GitLab