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

Commit 4acf95b

Browse files
authored
Merge pull request #8 from Nikhil-Vats/tutorial_branch
Updated README.md
2 parents 4785052 + 6fd53ce commit 4acf95b

File tree

1 file changed

+68
-11
lines changed

1 file changed

+68
-11
lines changed

README.md

Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,96 @@ Generates the scaffold for a BioJS component automatically so you don't have to
33

44
### What this tool currently does
55

6-
This tool specifically designed with re-packaging existing components in mind, so you can upgrade to BioJS 3 component style without having to re-write your component.
6+
This tool is specifically designed keeping in mind the idea of re-packaging existing components, so you can upgrade your components to BioJS 3 component style without having to re-write your component.
77

8-
### To-do / roadmap.
8+
## Getting started.
99

10-
See [issues](issues) for more details - we still need the following:
10+
Step 0: Install [node](https://nodejs.org/en/download/) and [npm](https://www.npmjs.com/) (npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer).
1111

12-
1. Scaffolder for _new_ browser tools (i.e. not just a wrapper for older tools)
13-
2. Scaffolder for command line tools.
12+
Note: If you need to manage multiple versions of node also consider [nvm](https://github.com/creationix/nvm).
1413

15-
## Getting started.
14+
Step 1: Install [Yeoman](http://yeoman.io).
1615

17-
First, install [Yeoman](http://yeoman.io) and generator-biojs-webcomponents using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)) - if you need to manage multiple versions of node also consider [nvm](https://github.com/creationix/nvm).
16+
```bash
17+
npm install -g yo
18+
```
1819

19-
Once node is installed, run this in your terminal.
20+
Step 2a: Install [generator-biojs-webcomponents](https://www.npmjs.com/package/@biojs/generator-biojs-webcomponents).
2021

21-
Note that below you can change my-new-component to the folder name of your choice.
22+
Note that below you can change my-new-component to the folder name of your choice. e.g. - your project name.
2223

2324
```bash
2425
mkdir my-new-component
2526
cd my-new-component
2627
npm install -g yo @biojs/generator-biojs-webcomponents
2728
```
2829

29-
Then generate your new project:
30+
Step 2b: Generate your new project.
3031

3132
```bash
3233
yo @biojs/biojs-webcomponents
3334
```
3435

35-
This will walk you through the process of setting up your component and generate boilerplate files for you.
36+
After running this, you will be asked some questions about the details of your project, after which the required dependencies will be automatically installed.
37+
3638
Once it's complete, look at your new README file for build instructions, and check out `src/index.js`
3739
and `examples/index.html` to get started - there are instructions in the code.
3840

41+
## Description of your Project's Folder Structure
42+
Once you complete all the steps mentioned above you will have a project with a folder structure like this -
43+
44+
```bash
45+
├── dev
46+
│ └────── serve.js
47+
├── examples
48+
│ └────── index.html
49+
├── img
50+
│ └────── favicon.png
51+
├── node_modules
52+
│ ├────── modules
53+
├── src
54+
│ ├────── index.js
55+
│ └────── style.less
56+
├── index.html
57+
├── LICENSE
58+
├── package.json
59+
├── package-lock.json
60+
├── README.md
61+
└── webpack.config.js
62+
```
63+
64+
### dev
65+
Contains code to view and test your application.
66+
67+
### examples
68+
Contains instructions to embed visualisation(s)/demo of your component. You should edit `index.html` in this folder to embed visualisations of your component on the examples page.
69+
70+
### img
71+
Contains a thumbnail for your component which will appear in places such as the browser's tab, address bar, browser history, bookmarks bar, etc. The default thumbnail is BioJS' logo, you should replace it with your component's visualisation.
72+
73+
### node_modules
74+
Contains dependencies required for your component.
75+
76+
### src
77+
### 1. index.js -
78+
Contains the instructions for implementing your component as Web Component. Follow the instructions and edit this file to implement your component as a Web Component.
79+
80+
### 2. style.less -
81+
Contains instructions for styling your component. Follow the instructions and edit this file to style your component.
82+
83+
### README.md
84+
Contains instructions for writing description of your component. You should edit this to write a tutorial for your component explaining how to use your component, embed visualisations, etc.
85+
86+
Other files are starter files for your project. Generally, you do not need to edit these files.
87+
88+
If you face any issue, feel free to contact us at [Gitter](https://gitter.im/yochannah).
89+
90+
### To-do / roadmap.
91+
92+
See [issues](issues) for more details - we still need the following:
93+
94+
1. Scaffolder for _new_ browser tools (i.e. not just a wrapper for older tools)
95+
2. Scaffolder for command line tools.
3996

4097
## License
4198

0 commit comments

Comments
 (0)