Skip to content

Commit 04aefd6

Browse files
authored
Merge pull request #617 from OpenKnowledgeMaps/webpack-optimization
Webpack optimization
2 parents 3e851d0 + 59c90a5 commit 04aefd6

66 files changed

Lines changed: 6649 additions & 5038 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,11 @@ server/preprocessing/other-scripts/renv
5555
.pytest_cache
5656
*__pycache__*
5757
.venv
58-
59-
# python files
60-
*.pyc
61-
*.pkl
62-
.ipynb_checkpoints
63-
*.ipynb
64-
/nbproject/private/
65-
/server/nbproject/private/
66-
.pytest_cache
6758
*.egg-info/
68-
*__pycache__*
69-
70-
# Mac files
71-
.DS_Store
7259

7360
# personal
74-
.vscode/settings.json
61+
.vscode/
62+
7563
# temporal
7664
local_dev/config_local_headstart.ini
7765
local_dev/config_local_searchflow.ini

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,32 @@ Head Start is a web-based knowledge mapping software intended to give researcher
99
### Client
1010
To get started, clone this repository. Next, duplicate the file `config.example.js` in the root folder and rename it to `config.js`.
1111

12-
Set the `skin` property in the config to one of the following values to use the
12+
Make sure to have installed `node` version >= 14.18.1 and `npm` version >=8.1.1 (best way to install is with [nvm](https://github.com/nvm-sh/nvm), `nvm install 14.18.1`) and run the following command to install the Headstart dependencies:
13+
14+
npm install
15+
16+
We use [webpack](https://webpack.github.io/) to build our client-side application. The development server is based on the `webpack serve` utility, which means that changes to files are tracked and the page is reloaded automatically. Run the local BASE example with the following command:
17+
18+
npm run example:base
19+
20+
The browser will automatically open a new window with the example.
21+
22+
You can run also different examples
23+
24+
- `npm run example:pubmed` will run the PubMed example
25+
- `npm run example:triple` will run the GoTriple example
26+
- `npm run example:viper` will run the Viper example
27+
- `npm run example:covis` will run the CoVis example
28+
29+
If everything has worked out, you should see the example visualization.
30+
31+
To run Headstart on a different server (e.g. Apache), you need to set the publicPath in `config.js` to the URL of the `dist` directory:
32+
* Dev: specify the full path including protocol, e.g. `http://localhost/headstart/dist`
33+
* Production: specify the full path excluding protocol, e.g. `//example.org/headstart/dist`
34+
35+
Then build it with the command `npm run prod`. The build will appear in the _dist/_ folder in the root directory.
36+
37+
You can also set the `skin` property in the config to one of the following values to use the
1338
particular data integration skin:
1439

1540
- `"covis"`
@@ -18,6 +43,14 @@ particular data integration skin:
1843

1944
or leave it empty (`""`) for the default project website skin.
2045

46+
See [client configuration](doc/README.md) for details on adapting the client.
47+
48+
Also see visualization [options](doc/README.md#visualisation-settings).
49+
50+
### Server
51+
52+
See [Installing and configuring the server](doc/server_config.md) for instructions on how to install and configure the server. Also, see [HOWTO: Get the search repos example to work](doc/howto_search_repos.md).
53+
2154
Make sure to have installed `node` version >= 14.18.1 and `npm` version >=8.1.1 (best way to install is with [nvm](https://github.com/nvm-sh/nvm), `nvm install 14.18.1`) and run the following two commands to build the Headstart client:
2255

2356
npm install

examples/local_triple/map.html

Lines changed: 0 additions & 327 deletions
This file was deleted.

examples/local_triple/stream.html

Lines changed: 0 additions & 329 deletions
This file was deleted.

examples/project_website/data-config_pubmed.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

examples/project_website/pubmed.html

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)