Development - evt-project/evt-viewer-angular GitHub Wiki
Requirements
For development, you will only need Node.js installed on your environment. We also strongly suggest that you use the appropriate TSLint plugin for your Editor (not mandatory).
Node
To install Node, just follow the indication on http://nodejs.org/; it is really easy to install and now it includes NPM installation. After the installation procedure, you should be able to run the following command to check if it was installed correctly (note that versions may differ):
$ node --version
v10.15.3
$ npm --version
6.4.1
Install development environment for EVT
$ git clone https://github.com/evt-project/evt-viewer-angular.git
$ cd evt-viewer-angular
$ npm install
Start & watch with development server
$ npm run start
If nothing happens, then open your browser and navigate to http://localhost:4205/
.
The app will automatically reload if you change any of the source files.
You can also choose the port where to run the application by running npm run start -- --port=4202
(in this case you should then connect to http://localhost:4202/
).
Code scaffolding
To generate new components, services, directive, etc you can use Angular CLI.
Run npm run ng generate component component-name -- --module=app.module
to generate a new component. You can also use npm run ng generate directive|pipe|service|class|guard|interface|enum|module
. You should always add the flag --module=app.module
since there are multiple modules. You can also indicate the path before component name: npm run ng generate component path-to-components/component-name -- --module=app.module
Linting
A very strict linting rule set has been configured for this app. Please run npm run lint
and correct any indications before any commit.
Please read the following subsection before starting to contribute to the code