Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating html & js of an element breaks documentation #108

Open
erne-mt opened this issue Aug 12, 2016 · 8 comments
Open

Separating html & js of an element breaks documentation #108

erne-mt opened this issue Aug 12, 2016 · 8 comments

Comments

@erne-mt
Copy link

erne-mt commented Aug 12, 2016

Description

When an element is separated into style/html and script parts, the creation of the iron-component-page documentation breaks.

Only properties and methods are displayed, no element description.

Question

Is it even possible to seperate html and js while keeping the documentation?

@jtrs
Copy link

jtrs commented Aug 18, 2016

+1

@erne-mt
Copy link
Author

erne-mt commented Sep 2, 2016

Additionally the documentation seems not to be recognizing the annotations of properties and methods correctly, when js & html are separated.

display_error_doc

@kito99
Copy link

kito99 commented Sep 2, 2016

+1 When using TypeScript, the documentation is completely empty, even though the generated JavaScript is a valid Polymer element (in a JS file that's separate from the HTML file).

@caranicas
Copy link

@erne-mt I think there might be an issue with your implementation because I am having no issues with docs and separate files. I created a generator to help with stubbing out elements, and I have my elements split into separate files, and have no problem with the documents being generated.

I've included a sample of what the .html looks like for a test element.

<!--
A Test description
-->

<link rel="import" href="test-el-styles.html">

<dom-module id="test-el">
  <template>
    <style include="test-el-styles"></style>
    <h1>Hello [[prop1]]<h1>
  </template>
  <script src="test-el.js"></script>
</dom-module>

@kito99
Copy link

kito99 commented Dec 8, 2016

@caranicas, can you show the file that has iron-component-page?

@caranicas
Copy link

@kito99 sure thing. This is the file, it's a little difficult to read because it has the yeoman template cruft around it. The is the exact line.

<iron-component-page src="bower_components/<%=elementName%>/<%=elementName%>.html" active="<%=elementName%>"></iron-component-page>

If you want to see it how it works I would suggest installing it and creating a component.

@caranicas
Copy link

@kito99 have you made any progress?

@kito99
Copy link

kito99 commented Dec 16, 2016

@caranicas I did, and it still didn't work for me, but I didn't have much time to look into it further. Hopefully I'll get a chance soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants