Skip to content

Commit aeea93c

Browse files
committed
describe static web site and library options in README
1 parent 7fccfc3 commit aeea93c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ If you are an R user, you may want to use the
7373
generate Jellyfish plots in RStudio, R Markdown, Shiny apps, or plain R.
7474
Otherwise, continue reading.
7575

76+
### Running with the Development Server
77+
7678
Jellyfish is a web application written in TypeScript. You need to have
7779
[Node.js](https://nodejs.org/) installed to run the tool.
7880

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

91+
### Building and Deploying as a Static Web Site
92+
93+
If you want to share the interactive Jellyfish plots with others, you can build
94+
the project as an application and deploy it as a static web site on any web
95+
server. An example of such a web site is available at
96+
[https://hautaniemilab.github.io/jellyfish/](https://hautaniemilab.github.io/jellyfish/).
97+
98+
Steps:
99+
100+
1. Perform steps 1-3 from the previous section.
101+
2. `npm run build:app` (builds the project)
102+
3. `cp -R data dist/app/` (copies the example data to the build directory)
103+
4. `cd dist/app`
104+
5. `python3 -m http.server` (starts a local web server for testing)
105+
6. Open your browser and navigate to http://localhost:8000/. You should see the
106+
user interface.
107+
7. To deploy the site to a web server, copy the contents of the `dist/app`
108+
directory to the server.
109+
110+
### Building a Jellyfish library
111+
112+
Jellyfish can be used as a library in other JavaScript applications, such as the
113+
[Jellyfisher](https://github.com/HautaniemiLab/jellyfisher) R package. For an
114+
example of how to use the library, see Jellyfisher's [source
115+
code](https://github.com/HautaniemiLab/jellyfisher/blob/main/inst/htmlwidgets/).
116+
117+
Steps:
118+
119+
1. Perform steps 1-3 from the first section.
120+
2. `npm run build:lib` (builds the library)
121+
3. The compiled library is available in the `dist/lib` directory.
122+
89123
## Input Data
90124

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

0 commit comments

Comments
 (0)