Skip to content

Developing the Unipept Web Components

Pieter Verschaffelt edited this page Sep 20, 2019 · 2 revisions

Installation guidelines

The Unipept Web Components repository is isolated from the main Unipept repository and contains reusable Vue-components that are being used by both the web application and the desktop application. It can be very handy to link the build output of these components with the main Unipept repository so that changes made to the web components are directly reflected in the main repository (this guideline is also applicable to development of the Unipept Desktop application).

This guide assumes that both the unipept and the unipept-web-components repository live in the same parent folder:

parent-folder
  |--- unipept
  |--- unipept-web-components

Execute the following commands to correctly link the build output of the Unipept web components with the main Unipept repository, from within the root of the main Unipept project.

  • First we'll create the necessary folders for these items to link to by executing mkdir node_modules/unipept-web-components.
  • Then, we'll create the symlinks themselves: ln -s ./../../../unipept-web-components/dist ./node_modules/unipept-web-components/dist and ln -s ../../../unipept-web-components/package.json ./node_modules/unipept-web-components/package.json.

These commands can also be executed directly by running the link_with_web_components.sh file in the root of both the desktop and web application folder.

Important notes:

  • NPM provides the npm link command that essentially performs the same operations, with one major difference. It links the complete contents of a package (including it's source code, node_modules, etc) into another project. We are unable to use this command as it causes a duplicate installation of Vue that results in major issues.

  • This link needs to be recreated everytime the npm install or yarn install commands have been executed.