Further documentation, especially about the components, can be found in the Wiki.
Node.js and npm (included with node) are needed to run this project.
cd jenz
npm install
npm install -g @angular/cli
jenz/node_modules/materialize-css/dist/js
npm start
When you run npm install
there may occur one error regarding the canvas. The canvas is used for the qr-code-generator component. It´s an optional dependency, which we DON´T use. So we can ignore this error message. You can browse this link https://github.com/SuperiorJT/angular2-qrcode to get more details about this.
There are some further warning regarding optional dependencies. Feel free to ignore them as well.
Q: "Oh my god, the course component does weird things and skipps multiple courses at once"
A: "You forgot to replace the Materialize.js - this should fix it."
Once you have installed the dependencies, you can start a development server by running npm start
.
Deployment is done in two phases: You need to build locally first, as building on Travis currently fails (see #18). Once building is done and succeeded you simply need to push it to the master branch ob Github. Deployment will then be triggered by Travis automatically.
Simply run npm run build-deploy
. This will set an environment variable and will trigger the Angular CLI build.
It might be possible that the build fails. This can either be due to an error with the cross-platform environemnt variable setting or because the code contains error.
In the prior case, set the environment variable manually (NODE_ENV=production
) and build by hand: ng build --prod --base-href https://openhpi.github.io/jenz/
.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|module
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.