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

Commit

Permalink
Merge pull request #31 from Nikhil-Vats/fix_css_bug
Browse files Browse the repository at this point in the history
Fixed css bug - custom styles not added to component
  • Loading branch information
sarthak-sehgal authored Jul 25, 2019
2 parents 864e005 + 5be0afb commit a36414d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions __tests__/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("generator-biojs-webcomponents:app - Make a new Web Component", () => {
assert.fileContent([
[
"examples/index.html",
'<test-component-tool geneId="BRCA1"></test-component-tool>'
'<test-component-tool geneId="BRCA1" class="BiojsTestComponent"></test-component-tool>'
],
["examples/index.html", "<h1>Biojs test component demo</h1>"],
["src/index.js", "define('test-component-tool', BiojsTestComponent);"],
Expand All @@ -53,7 +53,7 @@ describe("generator-biojs-webcomponents:app - Make a new Web Component", () => {
assert.fileContent([
[
"examples/index.html",
'<biojs-webcomponent-tool-name-here geneId="BRCA1"></biojs-webcomponent-tool-name-here>'
'<biojs-webcomponent-tool-name-here geneId="BRCA1" class="BioJSComponent"></biojs-webcomponent-tool-name-here>'
],
["examples/index.html", "<h1>BioJS component demo</h1>"],
[
Expand Down
3 changes: 2 additions & 1 deletion generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ module.exports = class extends Generator {
this.destinationPath("examples/index.html"),
{
title: this.props.toolNameHuman,
toolNameComputer: this.props.toolNameComputer
toolNameComputer: this.props.toolNameComputer,
toolNameCamel: this.props.toolNameCamel
}
);
this.fs.copyTpl(
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1><%= title %> demo</h1>

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

</body>

Expand Down

0 comments on commit a36414d

Please sign in to comment.