Ski Analytics is a web application that enables athletes to interactively explore and visualize their training data.
- Install npm (don't use yarn - this is causing build errors with D3 currently)
- Install angular-cli
npm install -g @angular/cli
First npm install ts-protoc-gen
then npm install && npm run build
From src/app/proto/Activity folder (containing the .proto file)
protoc --plugin=protoc-gen-ts=../../../../node_modules/.bin/protoc-gen-ts --js_out=import_style=commonjs,binary:. --ts_out=service=true:. Activity.proto
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
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 build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
debugged this by:
- created test case in new project
- found that the server was responding with an error due to cors. configured server to respond
- googled typescript return blob
this is a known bug with angular-cli angular/angular-cli#10653
resolved by adding the project name to this command like so:
ng g c --project='ski-analytics-web' activity/components/filter-hrzone --skip-import