aodb/Readme/DevelopmentGuide.md
Martin Donnelly afe73b5baa upload
2016-12-22 00:00:06 +00:00

207 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AODB Development
## Background
The AODB Mobile application built using Ionic, Angular and Typescript, it communicates with AODB over a well-defined, loosely coupled interface.
---
## Prerequisites
Access to the team foundation server for the AODB Mobile project which contains the git repository and project documentation.
[Transport AODB Mobile Team Foundation Server](http://i-t-v-tf01:8080/tfs/Transport/Chroma%20Refresh/AODB%20Mobile)
Access to the AODB Mobile project Thycotic Secret Server which contains all account information, usernames and passwords.
[Transport AODB Mobile Thycotic Secret Server](https://secrettransport.pdats.com)
---
## Contents
* [Overview](#overview)
* [Node Packages](#node-packages)
* [Setup and Run](#setup-and-run)
* [Development](#development)
* [Git Flow](#git-flow)
---
## Node Packages
Install the following node packages with specified versions
* gulp
* cordova
* ionic
* jspm
* bower
* npm-check
* npm-install-missing
* phantomjs-prebuilt
* sinopia
* pm2
**Install Node Packages with the following command in the terminal prompt:**
```
$ npm i -g gulp cordova ionic jspm bower npm-check npm-install-missing phantomjs-prebuilt sinopia pm2
```
**List installed Node Packages with the following command in the terminal prompt:**
```
$ npm ls -g --depth=0
```
---
## Setup and Run
The ionic info command prints out useful information about your systems Ionic environment and dependencies
```
$ ionic info
```
Clone the repo
```
$ git clone http://i-t-v-tf01:8080/tfs/Transport/Chroma%20Refresh/_git/AODB
```
Use gulp to install the projects dependencies
```
$ gulp install
```
Use gulp to build the project
```
$ gulp build
```
See the application running run the following command:
```
$ ionic serve -l
```
---
## Development
### TFS
[TFS Conventions Document](http://i-t-v-tf02:12345/ChromaDev/Chroma%20Processes/TFS%20Workflow/TFS%20Conventions.docx)
### Pull requests
>Pull requests let you tell others about changes you've pushed to a repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.
---
### Wallaby.js
>Wallaby.js is an intelligent and super fast test runner for JavaScript that continuously runs your tests. ... Wallaby.js is insanely fast, because it only executes tests affected by your code changes and runs your tests in parallel.
---
### Gulp
>Gulp is a task/build runner for development.
**Gulp watch task will watch all files in the application folder and rebuild the www folder when anything changes**
```
$ gulp watch
```
**Compiles and run the tests**
```
$ gulp test
```
**List Gulp tasks**
```
$ gulp --tasks
```
---
### Git Flow
**Initialize**
**Initialize gitflow**
```
$ git flow init
```
**Features**
**Start a new feature**
```
$ git flow feature start MYFEATURE
```
**Finish up a feature**
```
$ git flow feature finish MYFEATURE
```
**Publish a feature**
```
$ git flow feature publish MYFEATURE
```
**Get a feature published by another user.**
```
$ git flow feature pull origin MYFEATURE
```
**You can track a feature on origin by using**
```
$ git flow feature track MYFEATURE
```
**Releases**
**Start a release**
**To start a release, use the git flow release command**
```
$ git flow release start RELEASE [BASE]
```
**Publish the release branch after creating it to allow release commits by other developers.**
```
$ git flow release publish RELEASE
```
**Track a remote release**
```
$ git flow release track RELEASE
```
**Finish up a release**
**Finishing a release performs several actions:**
* Merges the release branch back into 'master'
* Tags the release with its name
* Back-merges the release into 'develop'
* Removes the release branch
**Finish release**
```
$ git flow release finish RELEASE
```
**Push your tags with**
```
$ git push --tags
```
---
**Start hotfix**
```
$ git flow hotfix start VERSION [BASENAME]
```
**Finish a hotfix**
```
$ git flow hotfix finish VERSION
```
---
**Commands**
| | | | |
|:---------------|:--------------|:-------------|:-------|
| |**init** | | |
|**git flow =>** |**feature =>** |**start =>** |**NAME**|
| |**release** |**finish** | |
| |**hotfix** |**pubish** | |
| | |**pull** | |
---