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

Commit 57c1f70

Browse files
authored
Merge pull request #9 from Nikhil-Vats/tutorial_branch
Updated toolNameHuman
2 parents 4acf95b + 555a635 commit 57c1f70

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

generators/app/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,12 @@ function toCamelCase(aString) {
147147
var tokens = aString.split(" ");
148148

149149
var camelString = "";
150-
tokens.map(function(token) {
151-
camelString += token[0].toUpperCase();
150+
tokens.map(function(token, index) {
151+
if (index) {
152+
camelString += token[0]; // Keep the first letter of the first word as it is
153+
} else {
154+
camelString += token[0].toUpperCase(); // Capitalize the first letter of other words
155+
}
152156
camelString += token.substring(1, token.length);
153157
return true;
154158
});

generators/app/templates/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ function initComponent(options) {
8282
* or where we might initialise a component written from scratch. Needs to be
8383
* paired with a `define` method call - see end of the page.
8484
**/
85-
export const BiojsComponent<%= toolNameCamel %> = {
85+
export const <%= toolNameCamel %> = {
8686
init: initComponent()
8787
};
8888

8989
// this line connects the html element in idex.html with the javascript
9090
// defined above.
91-
define('<%=toolNameComputer%>', BiojsComponent<%= toolNameCamel %>);
91+
define('<%=toolNameComputer%>', <%= toolNameCamel %>);

0 commit comments

Comments
 (0)