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

Commit a36414d

Browse files
Merge pull request #31 from Nikhil-Vats/fix_css_bug
Fixed css bug - custom styles not added to component
2 parents 864e005 + 5be0afb commit a36414d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

__tests__/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe("generator-biojs-webcomponents:app - Make a new Web Component", () => {
3434
assert.fileContent([
3535
[
3636
"examples/index.html",
37-
'<test-component-tool geneId="BRCA1"></test-component-tool>'
37+
'<test-component-tool geneId="BRCA1" class="BiojsTestComponent"></test-component-tool>'
3838
],
3939
["examples/index.html", "<h1>Biojs test component demo</h1>"],
4040
["src/index.js", "define('test-component-tool', BiojsTestComponent);"],
@@ -53,7 +53,7 @@ describe("generator-biojs-webcomponents:app - Make a new Web Component", () => {
5353
assert.fileContent([
5454
[
5555
"examples/index.html",
56-
'<biojs-webcomponent-tool-name-here geneId="BRCA1"></biojs-webcomponent-tool-name-here>'
56+
'<biojs-webcomponent-tool-name-here geneId="BRCA1" class="BioJSComponent"></biojs-webcomponent-tool-name-here>'
5757
],
5858
["examples/index.html", "<h1>BioJS component demo</h1>"],
5959
[

generators/app/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ module.exports = class extends Generator {
378378
this.destinationPath("examples/index.html"),
379379
{
380380
title: this.props.toolNameHuman,
381-
toolNameComputer: this.props.toolNameComputer
381+
toolNameComputer: this.props.toolNameComputer,
382+
toolNameCamel: this.props.toolNameCamel
382383
}
383384
);
384385
this.fs.copyTpl(

generators/app/templates/examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h1><%= title %> demo</h1>
2727

2828
<!-- the geneId param below can be removed if needed - it's just an example of
2929
how to pass values to the component's JS behaviours. -->
30-
<<%= toolNameComputer %> geneId="BRCA1"></<%= toolNameComputer %>>
30+
<<%= toolNameComputer %> geneId="BRCA1" class="<%= toolNameCamel %>"></<%= toolNameComputer %>>
3131

3232
</body>
3333

0 commit comments

Comments
 (0)