WSL/SLF GitLab Repository

README.md 1.64 KB
Newer Older
Thomas Egger's avatar
Thomas Egger committed
1
2
niViz - Snowpack Visualization
==============================
Sylvester Keil's avatar
Sylvester Keil committed
3
4
5

Setup
-----
Mathias Bavay's avatar
Mathias Bavay committed
6
Ensure that Node.js and make are available on your system as well as bower (installed through npm):
Sylvester Keil's avatar
Sylvester Keil committed
7

Sylvester Keil's avatar
Sylvester Keil committed
8
    $ node -v
Thomas Egger's avatar
Thomas Egger committed
9
    v8.5.0
Sylvester Keil's avatar
Sylvester Keil committed
10
11
    $ make -v
    GNU Make 4.0
Sylvester Keil's avatar
Sylvester Keil committed
12

Mathias Bavay's avatar
Mathias Bavay committed
13
Currently, it works properly with node 12.22.12 and npm 6.14.16. 
Sylvester Keil's avatar
Sylvester Keil committed
14
15
16
Then run `make dep` to fetch and install all dependencies. At any
time, you can run `make purge` to remove all downloaded dependencies
completely.
Sylvester Keil's avatar
Sylvester Keil committed
17

Sylvester Keil's avatar
Sylvester Keil committed
18
After this, `make server` starts a web server you can use for
Sylvester Keil's avatar
Sylvester Keil committed
19
20
development of the GUI; `make build` builds all applications;
`make dist` builds and compresses/minifies all applications.
Sylvester Keil's avatar
Sylvester Keil committed
21
22
23
24

Testing
-------
You can run the tests for the visualization library and the GUI
Sylvester Keil's avatar
Sylvester Keil committed
25
26
27
in Phantom JS (or a regular browser by visiting localhost at port
9876); additionally, the library tests can be run with Node.js or
in the Node debugger.
Sylvester Keil's avatar
Sylvester Keil committed
28
29

    $ make test        # Run all tests in Phantom JS
Sylvester Keil's avatar
Sylvester Keil committed
30
    $ make coverage    # Compile test coverage in Phantom JS
31
    $ make watch       # Start karma on port 9876
Sylvester Keil's avatar
Sylvester Keil committed
32
33
34

    $ make test-node   # Run library tests in Node.js
    $ make debug-node  # Run library tests in Node.js debugger
Sylvester Keil's avatar
Sylvester Keil committed
35
36
37
38

Documentation
-------------
Run `make doc` to generate the html API documentation in `./doc`.
39
40
41
42
43
44
45
46
47
48
49
50
51
52

Setting up a website
--------------------
If you want to run niViz hosted by an Apache server all requests (except
actual file requests) need to be redirected towards index.html. Please
add the following lines to your apache site configuration:

<pre><code>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ /index.html
</code></pre>