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

Feature/saml loop fix #108

Open
wants to merge 5 commits into
base: master
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
15 changes: 9 additions & 6 deletions frontend/Developing.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ This document describes some techniques you may find helpful while developing wi

While you don’t need to have anything installed other than Maven when building the project, you will want to have Node and the Node Package Manager installed directly on your development machine to facilitate quick turnarounds while developing.

### Node and NPM
### Node and Yarn

You can obtain Node from the [project’s website](https://nodejs.org). Installing Node on your machine will automatically install NPM as well.
You can obtain Node from the [project’s website](https://nodejs.org). The build tools for the front-end code require Node to run. The current version of Node, which is known to work, is 13.3.0 (newer versions should work as well, though they have not been tested).

You must also install Yarn. You can obtain it from [the Yarn project’s website](https://yarnpkg.com/en/). Yarn is prefered to
NPM as a tool for running the scripts used when building the Search UI project; it is also what is used to build the SUIT library itself. The current version of Yarn, which is known to work, is 1.21.1 (newer versions should work as well, though they have not been tested).

### IDE

Expand All @@ -24,9 +27,9 @@ When running with Tomcat, we follow these steps for making changes and quickly s

First, run the normal Maven build (`mvn clean install` from the root directory of the searchui project, for example) to build the UI and the WAR file that wraps it. The WAR will be placed into the searchui/server/target directory. Copy the WAR file to Tomcat’s webapps directory, renaming it to match your basename (e.g., searchui.war). When Tomcat runs, it will automatically unpack the WAR into a directory (e.g., webapps/searchui).

The output of the Webpack build is in the directory WEB-INF/classes/static inside your webapp directory (e.g., $CATALINA_HOME/webapps/searchui/WEB-INF/classes/static). You can now use the command `npm run watch` from within the searchui/frontend directory, passing the path to this Webpack build output directory, to have Webpack watch the source tree for changes and continuously compile and update the expanded WAR:
The output of the Webpack build is in the directory WEB-INF/classes/static inside your webapp directory (e.g., $CATALINA_HOME/webapps/searchui/WEB-INF/classes/static). You can now use the command `yarn watch` from within the searchui/frontend directory, passing the path to this Webpack build output directory, to have Webpack watch the source tree for changes and continuously compile and update the expanded WAR:

`npm run watch $CATALINA_HOME/webapps/searchui/WEB-INF/classes/static`
`yarn watch $CATALINA_HOME/webapps/searchui/WEB-INF/classes/static`

Doing this, changes are visible in your browser after refreshing in a second or two after you’ve saved them in the editor.

Expand All @@ -38,15 +41,15 @@ When running as an Attivio module, we follow these steps for making changes and

First, run the normal Maven build (`mvn clean install` from the root directory of the searchui project, for example) to build the UI and the module ZIP file that wraps it. The ZIP will be placed into the searchui/module/target directory. Run the command `aie-exec modulemanager -i` followed by the path to the ZIP file to install the module into the local copy of Attivio on your machine.

This will, among other things, add a directory to your Attivio installation under the `webapps/searchui/dist` directory. You can now use the command `npm run watch` from within the searchui/frontend directory, passing the path to this `webapps/searchui/dist` directory, to have Webpack watch the source tree for changes and continuously compile and update the expanded WAR.
This will, among other things, add a directory to your Attivio installation under the `webapps/searchui/dist` directory. You can now use the command `yarn watch` from within the searchui/frontend directory, passing the path to this `webapps/searchui/dist` directory, to have Webpack watch the source tree for changes and continuously compile and update the expanded WAR.

Doing this, changes are visible in your browser after refreshing in a second or two after you’ve saved them in the editor.

You also get the advantages of running the application within the context of the node, such as access to Attivio’s web application security.

#### Running in Attivio 5.5.0

If you are running Search UI as a module inside an Attivio 5.5.0 installation, you will need to manually copy the file `configuration.properties.js` into the `resources/searchui` directory in your project's configuration. You can then edit this file to configure your Search UI installation. This step is optional when installing into later versions of Attivio (5.5.1+), as the `configuration.properties.js` file in the installation will be used as a default if none exists in the project.
If you are running Search UI as a module inside an Attivio 5.5.0 installation, you will need to manually copy the file `configuration.properties.js` into the `resources/searchui` directory in your projects configuration. You can then edit this file to configure your Search UI installation. This step is optional when installing into later versions of Attivio (5.5.1+), as the `configuration.properties.js` file in the installation will be used as a default if none exists in the project.

## Developing the SUIT Library Itself

Expand Down
Loading