-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- Table of Contents
- Useful links
- Prerequisites
- Build and run the project
- Project management conventions
- Project Jira Page
- Amplify Library documentation
- Amplify CLI documentation
- Ionic UI Components documentation
This project requires the following components to run properly: Node.js
, ionic
framework and AWS Amplify CLI. If you would like to run on Android devices, you would also need to install Android Studio.
-
Node.js
Install
Node.js
LTS (Currently14.18.1
). You can directly downloadNode.js
from the official website. However, it is recommended to usenvs
to manage theNode.js
distribution on your machine.To install
nvs
, simply run the following commands according to the OS of your local machine:# Windows choco install nvs # Mac, Linux export NVS_HOME="$HOME/.nvs" git clone https://github.com/jasongin/nvs "$NVS_HOME" . "$NVS_HOME/nvs.sh" install
After installation, restart a new terminal to verify installation by typing
nvs --version
And then add
Node.js
LTS tonvs
and activate it# Add Node.js LTS to nvs nvs add lts # Activate LTS nvs use lts
Optionally, you can add
Node.js
LTS to yourPATH
to avoid repetitively activate itnvs link lts
Verify the activation of the correction
Node.js
by the following commandnode --verison
which should print
v14.18.0
. -
ionic
frameworkInstall
ionic
framework globally throughnpm
(yarn
orpnpm
not recommended)npm install -g @ionic/cli
Verify the installation by the following command
ionic --version
-
Amazon Amplify
Install
amplify cli
globally throughnpm
(yarn
orpnpm
not recommended).npm install -g @aws-amplify/cli
Follow the instructions in Amplify CLI documentation if it is your first time installing
-
Android Studio (Android SDK)
Install Android Studio. It has already included the Android SDK.
Our application targets API 29 or above.
Clone the repo and navigate to the root direcotry of this repo.
git clone https://github.com/cloudtrack/snu_class_2021_art.git
cd snu_class_2021_art
Run npm install
to install other not globally required dependencies.
npm install
Set up local amplify backend environment.
amplify pull
Since this is an Android application, add android
as a target platform to ionic capacitor
ionic cap add android
Simply run the following command to build to Android platform.
ionic cap build android
It's fast to boot and will give you the chance to look at the console log through the debug mode in your browser.
ionic serve
Open the directory android
in Android Studio and click run
to see the application running on an emulator. It will allow you to test some native features on Android.
The capacitor
plugin provided by ionic
framework allows you to preview your app on an Android device or an Android virtual device. It requires adb
installed since it detects the devices available using adb
.
If adb
is not installed no your machine (you should have if you followed all the instructions above though), go to the official site to get the platform tool. Alternatively, you can install through choco
on Windows by the following command:
choco install adb
Make sure that there are devices available to test on using adb devices
$ adb devices
List of devices attached
<your-device-id> device
You can use the following command to run and debug the app in a live-reloading manner.
ionic capacitor run android --livereload --external
# or if you are lazy
ionic cap run android -l --external
-
DO NOT try to commit on
main
branch directly -- It is not possible anyway. - Create a new branch based on
develop
branch -- all the newest changes happen on this branch. We also reconcile possible conflicts between branches on this branch - Open a new branch for every ticket in Jira.
- This is subject to change. I want to try conventional commits
There are two popular ways of writing a commit message: Tim Pope style (This is also recommended in the official guideline of Git, Pro Git), and the Conventional Commits style. The latter one is preferred in many large open-source projects since it dovetails SemVer. Here we adopt the Tim Pope style, for it's succinctness.
Here are the 7 rules for writing a good Tim Pope style commit message:
- Limit the subject line to 50 characters.
- Capitalize only the first letter in the subject line.
- Don't put a period at the end of the subject line.
- Put a blank line between the subject line and the body.
- Wrap the body at 72 characters.
- Use the imperative mood, but not past tense.
- Describe what was done and why, but not how.