Skip to content

Latest commit

 

History

History

frontend

LeagueTrollBuild Angular Frontend

This project was generated with Angular CLI.

Development server

Run npm run start for a dev server running the troll build project. Navigate to http://localhost:4200/.

Run npm run start-admin for a dev server running the troll build admin project. Navigate to http://localhost:4201/admin/login

The apps will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate <project> component component-name to generate a new component. You can also use ng generate <project> directive|pipe|service|class|guard|interface|enum|module.

Build

Run npm run build to build the troll build project. And run npm run build-admin to build the admin project.

The build artifacts will be stored in the dist/`directory. They will use the `--prod flag for a production build.

Running unit tests

Run ng test-all to execute the unit tests via Karma.

Running end-to-end tests

First ensure PostgreSQL is running.

Then start the backend either with Gradle: ./gradlew bootRun or in your IDE.

Next, use webdriver-manager to download the latest ChromeDriver and Selenium standalone server by running:

node_modules/.bin/webdriver-manager update
Note
e2e tests assume the backend already has data from Riot in the database. If missing data, run the All Retrievals job prior.

Otherwise you’ll see Error occurred while trying to proxy request and most tests will fail.

Run ng e2e-all to execute the end-to-end tests via Protractor.

Analyzing bundle stats

Note
Bundle statistics are only available for the troll build project.

Run npm run build-with-stats to build the project with statistics of the es2015 bundle. Then use the webpack-bundle-analyzer to analyze the stats json.

npx webpack-bundle-analyzer dist/troll-build/stats.json

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.