Software Tools and Emerging Tools for AI and ML Project..
This project was generated with Angular CLI version 12.2.1. It is a simple website that displays current weather in Ontario and current Date/Time. It used two main APIs - Open weather map and date.now() function of JS. Also, this repo has CI/CD enabled that can be triggered on every commit changes.
Main application components are located in: src/app folder
- Install node modules by running
npm install
. This will store the @angular libraries inside /node_modules folder. - Build the app by running
npm build
. - Run
ng serve
to run it in http://localhost:4200/ - If you get dependency error, install devkit by running:
npm install @angular-devkit/build-angular
- To run unit test on the app, execute:
ng test
. If you prefer to run test using headless chrome, you can execute `ng test --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false. - From your terminal window, you will see the Code Coverage report generated by karma coverage istanbul.
- Additionally, you may view the report in a more visual format by uploading it in Codecov with command:
codecov --disable=gcov -t <token>
Pre-requisite:
Set-up Firebase account and project from firebase console
- Run
ng build
to build the project. The build artifacts will be stored in thedist/
directory. - Ensure that all the static files (e.g index.html) are placed inside the dist/folder.
- Install firebase tools including cli by running
npm install -g firebase-tools
- Login to Firebase by running
firebase login --interactive
- Initiate firebase by running
firebase init hosting
- Answer all the required items correcttly.
- Edit firebase.json file and ensure that the public line shows
public:dist
given that step-2 is confirmed. - Run
npm run build
- Run
firebase deploy
Alternatively, you may push the code here and the steps above will be performed automatically via Travis CI.
FIREBASE URL (Prod): https://team-rocket-swt.web.app/
HEROKU URL (Dev): https://weather-swt.herokuapp.com/
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
- https://github.com/iamAjayDahiya/ (AngularJS app)
- https://github.com/madserrano (TravisCI, Unit Testing - Karma, CodeCov, Firebase deployment)