Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack optimization #617

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ server/preprocessing/other-scripts/renv
/nbproject/private/
/server/nbproject/private/
.pytest_cache
*__pycache__*
*__pycache__*

.venv
.DS_Store
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,32 @@ Head Start is a web-based knowledge mapping software intended to give researcher
### Client
To get started, clone this repository. Next, duplicate the file `config.example.js` in the root folder and rename it to `config.js`.

Set the `skin` property in the config to one of the following values to use the
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:

npm install

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:

npm run example:base

The browser will automatically open a new window with the example.

You can run also different examples

- `npm run example:pubmed` will run the PubMed example
- `npm run example:triple` will run the GoTriple example
- `npm run example:viper` will run the Viper example
- `npm run example:covis` will run the CoVis example

If everything has worked out, you should see the example visualization.

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:
* Dev: specify the full path including protocol, e.g. `http://localhost/headstart/dist`
* Production: specify the full path excluding protocol, e.g. `//example.org/headstart/dist`

Then build it with the command `npm run prod`. The build will appear in the _dist/_ folder in the root directory.

You can also set the `skin` property in the config to one of the following values to use the
particular data integration skin:

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

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

See [client configuration](doc/README.md) for details on adapting the client.

Also see visualization [options](doc/README.md#visualisation-settings).

### Server

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).

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:

npm install
Expand Down
327 changes: 0 additions & 327 deletions examples/local_triple/map.html

This file was deleted.

329 changes: 0 additions & 329 deletions examples/local_triple/stream.html

This file was deleted.

50 changes: 0 additions & 50 deletions examples/project_website/data-config_pubmed.js

This file was deleted.

120 changes: 0 additions & 120 deletions examples/project_website/pubmed.html

This file was deleted.

Loading