Skip to content
This repository was archived by the owner on Mar 30, 2021. It is now read-only.

Commit 39df0e8

Browse files
committed
add running docs for component users to the readme
1 parent 69ce537 commit 39df0e8

File tree

2 files changed

+45
-8
lines changed

2 files changed

+45
-8
lines changed

generators/app/templates/README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,39 @@
22

33
FIXME: fill out a description of your tool here! :)
44

5+
## Component user docs: adding this component to your webpage
6+
7+
Hey! If you'd like to use this component on your webpage, please do the following:
8+
9+
### In the `<head>`, add:
10+
```html
11+
<!-- the library for the webcomponent -->
12+
<script src="dist/bundle.js" type="module"></script>
13+
```
14+
15+
This links to the relevant scripts to define the component and fetch data.
16+
17+
### In the `<body>`
18+
19+
Where you want your WebComponent to appear, add the following:
20+
21+
```html
22+
<<%= toolNameComputer %>
23+
geneId="BRCA1">
24+
</<%= toolNameComputer %>>
25+
```
26+
27+
Some notes on usage:
28+
29+
- `geneId` value must must be an identifier for a gene. You can replace it
30+
with your favourite gene id instead!
31+
32+
533
## Licence
634
<%= licence %>
735

36+
## Developer docs
37+
838
### To set up locally for development
939

1040
1. Clone the repo
@@ -42,5 +72,6 @@ To serve your page at [http://localhost:3456](http://localhost:3456):
4272
```bash
4373
npm run server
4474
```
45-
46-
To see a demo component implemented similarly to this component, visit
75+
#### Example comonent
76+
To see a demo component implemented similarly to this component, visit
77+
[biojs-webcomponent-prototype](https://github.com/yochannah/biojs-webcomponent-prototype).

generators/app/templates/index.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ <h1><%= title %> demo pages</h1>
2626

2727
<a href="examples/index.html">Visit the example demo page.</a>
2828
<p> You can add links to more demos here if needed.</p>
29-
<p>
30-
To learn more about creating BioJS components, visit
31-
<a href="http://training.biojs.net">the BioJS training pages</a>,
32-
and to browse BioJS components, visit
33-
<a href="http://biojs.net">the BioJS Registry</a>.
34-
</p>
29+
<h2></h2>
30+
<p></p>
31+
<h2>Learn more about BioJS</h2>
32+
<ul>
33+
<li>To learn more about creating BioJS components, visit
34+
<a href="http://training.biojs.net">the BioJS training pages</a></li>
35+
<li>View a
36+
<a href="https://github.com/yochannah/biojs-webcomponent-prototype">
37+
demo biojs webcomponent example</a> you could emulate.</li>
38+
<li> To browse BioJS components, visit
39+
<a href="http://biojs.net">the BioJS Registry</a></li>.
40+
</ul>
3541

3642

3743
</body>

0 commit comments

Comments
 (0)