PolymerElements / iron-component-page

A reusable landing page for elements
36 stars 32 forks source link

Separating html & js of an element breaks documentation #108

Open erne-mt opened 8 years ago

erne-mt commented 8 years ago

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 commented 8 years ago

+1

erne-mt commented 8 years ago

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

display_error_doc

kito99 commented 8 years ago

+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 commented 7 years ago

@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 commented 7 years ago

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

caranicas commented 7 years ago

@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 commented 7 years ago

@kito99 have you made any progress?

kito99 commented 7 years ago

@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.