Skip to content

Commit

Permalink
Merge branch 'master' into wcag-focus-order
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-lee authored Apr 23, 2024
2 parents 323054e + dd6fee1 commit dd1b282
Show file tree
Hide file tree
Showing 6 changed files with 1,850 additions and 1,134 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ jobs:
check:
name: Check code
uses: collectionspace/.github/.github/workflows/check-js.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The CollectionSpace user interface for web browsers.

Release 5.0 or later of the CollectionSpace server is required. This application is not compatible with releases 4.5 and earlier.

Release 5.1 or later of the CollectionSpace server is recommended. See the [release notes](https://github.com/collectionspace/cspace-ui.js/tree/master/RELEASE_NOTES.md) to use this application with earlier releases.
Release 8.0 or later of the CollectionSpace server is recommended. See the [release notes](https://github.com/collectionspace/cspace-ui.js/tree/master/RELEASE_NOTES.md) to use this application with earlier releases.

## Installation

Expand All @@ -18,7 +18,7 @@ The CollectionSpace UI is a JavaScript application that runs in a web browser. S

### For CollectionSpace Developers

[Node.js](https://nodejs.org/) 18 and npm 9 are recommended to build the application. A minimum of Node.js 14 and npm 7 are required.
[Node.js](https://nodejs.org/) 20 and npm 10 are recommended to build the application. A minimum of Node.js 18 and npm 9 are required.

To download and install the source code of the application for development:

Expand All @@ -28,6 +28,25 @@ $ cd cspace-ui.js
$ npm install
```

To run the application in development, using a remote back-end CollectionSpace server:

```
$ npm run devserver --back-end=https://core.dev.collectionspace.org
```

Then open a browser to http://localhost:8080.

Alternatively, to run the application in development, using the UI configuration in index.html:

```
$ npm run devserver
```

By default, the configuration in index.html uses the CollectionSpace services API located at
http://localhost:8180. To run the application against CollectionSpace services located on a
different host, edit index.html, and change the `serverUrl` configuration property. Note that the
specified server must be configured to allow CORS requests from http://localhost:8080.

See the [developer documentation](https://github.com/collectionspace/cspace-ui.js/tree/master/docs/developer) for instructions on building, testing, and running the source code.

## About CollectionSpace
Expand Down
7 changes: 5 additions & 2 deletions docs/developer/BuildScripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ npm run devserver [--back-end=<url> [--local-index=<path>]]

The `devserver` script starts a local development web server, listening at port 8080. The cspace-ui application may be accessed in a browser by opening the URL http://localhost:8080. As source code files are edited, changes are automatically detected and deployed into the dev server. The browser automatically reloads the page, so the latest changes are always visible.

If the `back-end` option is supplied, the dev server acts as a proxy to the specified URL. This allows the locally running UI to connect to a remote CollectionSpace server regardless of CORS settings on that server. When the index.html file is retrieved from the server, the proxy attempts to rewrite it to inject the local UI that is under development. If this fails, or other changes are needed to the index.html file retrieved from the server, a local index file can be substituted by supplying the `local-index` option, specifying a path to a local HTML file.
If the `--back-end` option is supplied, the dev server acts as a proxy to the specified URL. This allows the locally running UI to connect to a remote CollectionSpace server regardless of CORS settings on that server. When the index.html file is retrieved from the server, the proxy attempts to rewrite it to inject the local UI that is under development. If this fails, or other changes are needed to the index.html file retrieved from the server, a local index file can be substituted by supplying the `local-index` option, specifying a path to a local HTML file.

If the `back-end` option is not supplied, the page served by the dev server is the top-level [index.html](../../index.html) file.
> [!WARNING]
> SAML single sign-on will not work when using the `--back-end` option. If SSO is required while developing the UI, run the development server without `--back-end`, as described below.
If the `--back-end` option is not supplied, the page served by the dev server is the top-level [index.html](../../index.html) file. The URL of the CollectionSpace server to use can be set by specifying the `serverUrl` configuration property in index.html. Note that the CORS settings on that server must allow the origin `http://localhost:8080`.

To stop the dev server, type control-c in the shell in which it was started.

Expand Down
Loading

0 comments on commit dd1b282

Please sign in to comment.