This repository has been archived by the owner on Aug 14, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
452 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"project": { | ||
"name": "BigTop" | ||
}, | ||
"apps": [ | ||
{ | ||
"root": "src", | ||
"outDir": "dist", | ||
"assets": [ | ||
"assets", | ||
"favicon.ico" | ||
], | ||
"index": "index.html", | ||
"main": "app/main.ts", | ||
"polyfills": "polyfills.ts", | ||
"test": "test.ts", | ||
"tsconfig": "tsconfig.app.json", | ||
"testTsconfig": "tsconfig.spec.json", | ||
"prefix": "app", | ||
"scripts": [], | ||
"environmentSource": "environments/environment.ts", | ||
"environments": { | ||
"dev": "environments/environment.ts", | ||
"prod": "environments/environment.prod.ts" | ||
} | ||
} | ||
], | ||
"e2e": { | ||
"protractor": { | ||
"config": "./protractor.conf.js" | ||
} | ||
}, | ||
"lint": [ | ||
{ | ||
"project": "src/tsconfig.app.json", | ||
"exclude": "**/node_modules/**" | ||
}, | ||
{ | ||
"project": "src/tsconfig.spec.json", | ||
"exclude": "**/node_modules/**" | ||
}, | ||
{ | ||
"project": "e2e/tsconfig.e2e.json", | ||
"exclude": "**/node_modules/**" | ||
} | ||
], | ||
"test": { | ||
"karma": { | ||
"config": "./karma.conf.js" | ||
} | ||
}, | ||
"codeCoverage": { | ||
"exclude": [ | ||
"src/polyfills.ts", | ||
"src/test.ts", | ||
"src/mocks.ts", | ||
"**/*.mock.ts", | ||
"**/node_modules/**" | ||
] | ||
}, | ||
"defaults": { | ||
"styleExt": "css", | ||
"component": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
## config.xml: | ||
|
||
Update the package name: | ||
|
||
<widget id="org.robferguson.BigTop" version="1.0.0" | ||
xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
|
||
Then add and remove (supported) platforms: | ||
|
||
ionic cordova platform rm android | ||
ionic cordova platform add android | ||
|
||
## Run in Emulator | ||
|
||
Run: | ||
|
||
ionic cordova emulate [<platform>] [options] | ||
|
||
Print out console logs to terminal: | ||
|
||
ionic cordova emulate android --consolelogs | ||
ionic cordova emulate android --consolelogs --address=192.168.1.115 | ||
|
||
## Run on Device | ||
|
||
* [Apache Cordova - Android Platform Support - Installing the Requirements](https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#installing-the-requirements) | ||
* [Apache Cordova - iOS Platform Support - Installing the Requirements](https://cordova.apache.org/docs/en/latest/guide/platforms/ios/#installing-the-requirements) | ||
|
||
Build: | ||
|
||
ionic cordova build [<platform>] [options] | ||
|
||
Run: | ||
|
||
ionic cordova run [<platform>] [options] | ||
|
||
Build and run on Android: | ||
|
||
ionic cordova build android | ||
ionic cordova run android --consolelogs | ||
|
||
Build and run on iOS: | ||
|
||
ionic cordova build ios | ||
ionic cordova run ios --consolelogs --address=192.168.1.115 | ||
|
||
|
||
## Unit Testing and End-to-End (E2E) Testing | ||
|
||
* [Testing an Angular project](https://angular.io/guide/testing) | ||
* [Testing an Ionic project](http://lathonez.com/2017/ionic-2-unit-testing/) | ||
|
||
Updated `tsconfig.ng-cli.json` in `compilerOptions`: | ||
```json | ||
"paths": { | ||
"@app/env": [ | ||
"environments/environment" | ||
] | ||
} | ||
``` | ||
|
||
### Jasmine | ||
|
||
The [Jasmine test framework](https://jasmine.github.io/2.4/introduction.html) provides everything needed to write basic tests. | ||
|
||
### Karma | ||
|
||
The [Karma test runner](https://karma-runner.github.io/1.0/index.html) is ideal for writing and running unit tests while | ||
developing an application. It can be an integral part of the project's development and continuous integration processes. | ||
|
||
Run: | ||
|
||
npm test | ||
|
||
### Protractor | ||
|
||
Use protractor to write and run end-to-end (e2e) tests. End-to-end tests explore the application as users experience it. | ||
In e2e testing, one process runs the real application and a second process runs protractor tests that simulate user | ||
behavior and assert that the application respond in the browser as expected. | ||
|
||
Run: | ||
|
||
ionic serve [--platform=ios] | ||
|
||
Then (in a second terminal session): | ||
|
||
npm e2e | ||
|
||
### Test Coverage | ||
|
||
Run: | ||
|
||
npm test-coverage | ||
|
||
In the `./coverage` folder open `index.html`: | ||
|
||
<p align="center"> | ||
<img src="https://github.com/Robinyo/aus-id/blob/master/screen-shots/test-coverage.png"> | ||
</p> | ||
|
||
## Documentation | ||
|
||
To install Compodoc globally: | ||
|
||
npm install -g @compodoc/compodoc | ||
|
||
To add Compodoc to your project: | ||
|
||
npm install --save-dev @compodoc/compodoc | ||
|
||
Define script tasks for Compodoc in your `package.json`: | ||
|
||
"scripts": { | ||
"docs": "./node_modules/.bin/compodoc -d ./docs/ -p ./tsconfig.json --theme vagrant", | ||
"serve-docs": "./node_modules/.bin/compodoc -s -d ./docs" | ||
} | ||
|
||
To generate documentation (using Compodoc): | ||
|
||
npm run docs | ||
|
||
To serve the generated documentation: | ||
|
||
npm run serve-docs | ||
|
||
Open your browser and navigate to: | ||
|
||
http://localhost:8080 | ||
|
||
**Note:** You can exclude files from the generated documentation via `tsconfig.json`: | ||
|
||
``` | ||
"exclude": [ | ||
"./node_modules", | ||
"./temp/**/*.ts", | ||
"./src/environments/*.ts", | ||
"./src/services/**/*.ts", | ||
"**/*.spec.ts" | ||
] |
Oops, something went wrong.