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.
@@ -32,21 +32,21 @@ Step 2b: Generate your new project.
32
32
```
33
33
i) yo @biojs/biojs-webcomponents
34
34
```
35
-
This will make a new directory named `web-component` in the current directory. The `web-component` directory will be your project directory. If there is already a directory with the name `web-component`, the generator will not make a new one, rather the existing one will be your project directory.
35
+
This will make a **new directory** named `web-component` in the **current directory**. The `web-component` directory will be your **project directory**. If there is already a directory with the name `web-component`, the generator will not make a new one, rather **the existing one will be your project directory**.
36
36
37
37
OR
38
38
39
39
```
40
40
ii) yo @biojs/biojs-webcomponents .
41
41
```
42
-
This will run the generator in the current directory.
42
+
This will run the generator in the **current directory**.
43
43
44
44
OR
45
45
46
46
```
47
47
iii) yo @biojs/biojs-webcomponents /anyPath/yourNewProjectDir
48
48
```
49
-
This will run the generator in a new directory named `yourNewProjectDir` (you can choose any other name), the new directory will be created at the path you specified. If there is already a directory with the same name as you provided, the generator will not make a new one, rather the existing one will be your project directory.
49
+
This will run the generator in a new directory named `yourNewProjectDir` (you can choose any other name), the new directory will be created at the **path you specified**. If there is already a directory with the same name as you provided, the generator will not make a new one, rather **the existing one will be your project directory**.
50
50
51
51
52
52
@@ -58,7 +58,7 @@ and `examples/index.html` to get started - there are instructions in the code.
58
58
## II. Description of your Project's Folder Structure
59
59
Once you complete all the steps mentioned above you will have a project with a folder structure like this -
60
60
61
-
```bash
61
+
```
62
62
├── dev
63
63
│ └────── serve.js
64
64
├── examples
@@ -108,7 +108,9 @@ If you face any issue, feel free to contact us at [Gitter](https://gitter.im/bio
108
108
109
109
After running ```yo @biojs/biojs-webcomponents``` in your terminal, you will be asked -
110
110
111
-
```bash
111
+
```
112
+
? Press Enter key to get going!
113
+
112
114
? What do you want to do today?
113
115
> Upgrade an existing component to a Web Component
114
116
Make a new Web Component
@@ -120,86 +122,124 @@ Based on your choice, you will be asked different questions. Read more -
120
122
121
123
A) Import the build file of your existing component into the project's directory.
122
124
123
-
1) You can import the build file from your local computer.
124
-
2) If you do not have the build file in your computer, you can import it from your component's package on npm.
125
+
1) Install the component from npm [**Recommended - Fastest way**]
126
+
2) You can import the build file from your local computer.
127
+
3) If you do not have the build file in your computer, you can import it from your component's package on npm.
125
128
126
-
```bash
129
+
```
127
130
? We need the build file (generally index.js, main.js or componentName.js) for this,
128
131
import it using one of the options -
129
-
1) Tell us the path of the file on your local machine and we will import it in the project.
130
-
2) Tell us the npm package name, version, etc. and we will import it.
132
+
1) Install component from npm package (Recommended - fastest way)
133
+
2) Tell us the path of the file on your local machine and we will import it in the project.
134
+
3) Tell us the npm package name, version, etc. and we will import it.
131
135
```
132
136
133
-
Import from your local machine -
137
+
B1) Install component from npm package -
134
138
135
-
B) Enter the path of your build file.
139
+
You have to enter the package name (case sensitive) of your component, the generator will show you the description of your package and ask whether the description shown is correct or not.
140
+
141
+
```
142
+
Enter the package name (case sensitive).
143
+
Press enter if the package description shown is correct.
144
+
```
145
+
146
+
If the description shown is incorrect, press ```N``` and you will go back to step A where you can choose to enter the package name again or import the file from local storage.
147
+
148
+
```
149
+
? What do you want to do?
150
+
1) Enter package name again to install component from npm package. (Recommended - fastest way)
151
+
2) Import the file locally from your computer.
152
+
3) Enter package name, version, build file URL to download the build file.
153
+
```
154
+
155
+
If the description shown is correct, press ```Enter``` or ```Y```. You will be asked about the version of the package you want to import from. You can press ```Enter``` if you want to import from the latest version or you can enter the version you need. If you enter a version which does not exist, the generator will ask for version again.
156
+
157
+
```
158
+
Great! We will import the latest version of your file from the npm package, if you don't want this,
159
+
enter the version.
160
+
```
161
+
162
+
Your component will be installed. Next, the questions in [this](#make-a-new-web-component) section will be asked.
163
+
164
+
B2) Import build file from your local storage -
165
+
166
+
Firstly, the generator will ask you about the build directory - the build file will be imported in this directory which will be created in your project directory. You can press ```Enter``` if you want the default name - ```component-dist``` or enter a name of your choice.
167
+
168
+
If a directory with the same name already exists in your project directory, you can either enter a new name for your directory or press ```o```/```O``` if you want to overwrite the content of existing directory.
136
169
137
-
```bash
138
-
Please enter the path of the build file.
170
+
```
171
+
The build file will be imported in a separate directory in the project's root.
172
+
Enter the name of this directory or press Enter if you like to go with default.
173
+
(component-dist)
139
174
```
140
175
141
-
The generator will make a directory named ```component-dist``` in your component's directory. Your build file will be imported in this directory. If this directory (component-dist) already exists, you can enter ```skip``` and enter the path of the build file in the next question (given below).
176
+
Enter the path of your build file.
142
177
143
-
```bash
144
-
Please enter the path of the build file, we will paste it into the existing directory.
178
+
```
179
+
Please enter the path of the build file.
145
180
```
146
181
147
-
Import from your compnent's package on npm -
182
+
Your build file will be imported in the build directory. Next, the questions in [this](#make-a-new-web-component) section will be asked.
148
183
149
-
C) You have to enter the package name (case sensitive) of your component, the generator will show you the description of your package and ask whether the description shown is correct or not.
184
+
B3) Import build file from your compnent's package on npm -
150
185
151
-
```bash
186
+
You have to enter the package name (case sensitive) of your component, the generator will show you the description of your package and ask whether the description shown is correct or not.
187
+
188
+
```
152
189
Enter the package name (case sensitive).
153
190
Press enter if the package description shown is correct.
154
191
```
155
192
156
193
If the description shown is incorrect, press ```N``` and you will go back to step A where you can choose to enter the package name again or import the file from local storage.
157
194
158
-
```bash
195
+
```
159
196
? What do you want to do?
160
-
1) Enter package name again.
197
+
1) Enter package name again to install component from npm package. (Recommended - fastest way)
161
198
2) Import the file locally from your computer.
199
+
3) Enter package name, version, build file URL to download the build file.
162
200
```
163
201
164
-
If the description shown is correct, press ```Enter``` or ```Y```. You will be asked about the version of the package you want to import from.
202
+
If the description shown is correct, press ```Enter``` or ```Y```. You will be asked about the version of the package you want to import from. You can press ```Enter``` if you want to import from the latest version or you can enter the version you need. If you enter a version which does not exist, the generator will ask for version again.
165
203
166
-
```bash
167
-
Great! We will import the latest version of your file from the npm package,if you don't want this,
168
-
enter the version.
204
+
```
205
+
Great! We will import the latest version of your file from the npm package,
206
+
if you don't want this, enter the version.
169
207
```
170
208
171
-
You can press ```Enter``` if you want to import from the latest version or you can enter the version you need. If the version exists, you will be shown a URL which will redirect you to your package's directory.
209
+
Once you enter a valid version and press ```Enter```, the generator will ask you about the build directory - the build file will be imported in this directory which will be created in your project directory. You can press ```Enter``` if you want the default name - ```component-dist``` or enter a name of your choice.
172
210
173
-
```bash
174
-
This URL - https://www.jsdelivr.com/package/npm/<your-package-name>?version=<your-package-version>
175
-
contains the directory of the package, please find the build file (generally in the dist or build
176
-
folder) and paste the link here, we will download it for you.
177
-
```
211
+
If a directory with the same name already exists in your project directory, you can either enter a new name for your directory or press ```o```/```O``` if you want to overwrite the content of existing directory.
178
212
179
-
After going to this URL, you can find the build file in the root folder or a separate folder named build or dist. The build file is generally named index.js, package_name.js, index.min.js or package_name.min.js.
213
+
```
214
+
The build file will be imported in a separate directory in the project's root.
215
+
Enter the name of this directory or press Enter if you like to go with default.
216
+
(component-dist)
217
+
```
180
218
181
-
You have to copy the URL/link to the build file and enter it and the generator will download it foryouina directory named ```component-dist```. If this directory (component-dist) already exists then enter ```skip``` and enter the URL in the next question (given below).
219
+
Once you have your build directory ready, generator will show you a URL, which containts the component's directory. You can find the build file in the root folder or a separate folder named build, dist, etc. The build file is generally named index.js, package_name.js, index.min.js or package_name.min.js, etc. Copy the URL of the build file and paste it in the generator.
182
220
183
-
```bash
221
+
```
184
222
This URL - https://www.jsdelivr.com/package/npm/<your-package-name>?version=<your-package-version>
185
-
contains the directory of the package, please find the build file (generally in the dist or build
186
-
folder) and paste the link here, we will download it foryouin the existing folder.
223
+
contains the directory of the package, please find the build file (generally in the dist or build
224
+
folder) and paste the link here, we will download it for you.
187
225
```
188
226
189
-
D) After successfully importing the build file, you will be asked the same questions (questions A and B in the next section) about your component as asked while [making a new one](#make-a-new-web-component).
227
+
The generator will download the build file in the build directory. Next, the questions in [this](#make-a-new-web-component) section will be asked.
228
+
229
+
C) After successfully installing the component/importing the build file, you will be asked the same questions (questions A and B in the next section) about your component as asked while [making a new one](#make-a-new-web-component).
190
230
191
231
### Make a new Web Component
192
232
193
233
A) Enter computer package name. This should contain only small alphabets and hyphen ( - ) between the words. You can't use CAPITAL letters, number, space, any other special character(s) and hyphen at beginning or end.
194
234
195
-
```bash
235
+
```
196
236
Computer package name? This is a computer name with NO capital letters or special
197
237
characters apart from the hyphen ( - ) .
198
238
```
199
239
200
240
B) Enter human name for the project. This can only contain letters (small and capital) and spaces, no other special characters or numbers.
201
241
202
-
```bash
242
+
```
203
243
Thanks! Now, give me a human name for the project with only letters and NO special
204
244
characters apart from the whitespace (space). e.g. \"Genome Browser\"
0 commit comments