Skip to content

Commit

Permalink
describe static web site and library options in README
Browse files Browse the repository at this point in the history
  • Loading branch information
tuner committed Nov 7, 2024
1 parent 7fccfc3 commit aeea93c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ If you are an R user, you may want to use the
generate Jellyfish plots in RStudio, R Markdown, Shiny apps, or plain R.
Otherwise, continue reading.

### Running with the Development Server

Jellyfish is a web application written in TypeScript. You need to have
[Node.js](https://nodejs.org/) installed to run the tool.

Expand All @@ -86,6 +88,38 @@ Once the development server is running, open your browser and navigate to
http://localhost:5173/. You should see the user interface, which allows you to
render Jellyfish plots based on your data.

### Building and Deploying as a Static Web Site

If you want to share the interactive Jellyfish plots with others, you can build
the project as an application and deploy it as a static web site on any web
server. An example of such a web site is available at
[https://hautaniemilab.github.io/jellyfish/](https://hautaniemilab.github.io/jellyfish/).

Steps:

1. Perform steps 1-3 from the previous section.
2. `npm run build:app` (builds the project)
3. `cp -R data dist/app/` (copies the example data to the build directory)
4. `cd dist/app`
5. `python3 -m http.server` (starts a local web server for testing)
6. Open your browser and navigate to http://localhost:8000/. You should see the
user interface.
7. To deploy the site to a web server, copy the contents of the `dist/app`
directory to the server.

### Building a Jellyfish library

Jellyfish can be used as a library in other JavaScript applications, such as the
[Jellyfisher](https://github.com/HautaniemiLab/jellyfisher) R package. For an
example of how to use the library, see Jellyfisher's [source
code](https://github.com/HautaniemiLab/jellyfisher/blob/main/inst/htmlwidgets/).

Steps:

1. Perform steps 1-3 from the first section.
2. `npm run build:lib` (builds the library)
3. The compiled library is available in the `dist/lib` directory.

## Input Data

Jellyfish reads data as tab-separated files from the `data/` directory. Below is
Expand Down

0 comments on commit aeea93c

Please sign in to comment.