You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 30, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+68-11Lines changed: 68 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,39 +3,96 @@ Generates the scaffold for a BioJS component automatically so you don't have to
3
3
4
4
### What this tool currently does
5
5
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.
7
7
8
-
### To-do / roadmap.
8
+
##Getting started.
9
9
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).
11
11
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).
14
13
15
-
## Getting started.
14
+
Step 1: Install [Yeoman](http://yeoman.io).
16
15
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
+
```
18
19
19
-
Once node is installed, run this in your terminal.
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.
22
23
23
24
```bash
24
25
mkdir my-new-component
25
26
cd my-new-component
26
27
npm install -g yo @biojs/generator-biojs-webcomponents
27
28
```
28
29
29
-
Then generate your new project:
30
+
Step 2b: Generate your new project.
30
31
31
32
```bash
32
33
yo @biojs/biojs-webcomponents
33
34
```
34
35
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
+
36
38
Once it's complete, look at your new README file for build instructions, and check out `src/index.js`
37
39
and `examples/index.html` to get started - there are instructions in the code.
38
40
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)
0 commit comments