dart-archive / custom-element-apigen

Tool to generate Dart APIs for polymer custom elements written in Javascript
BSD 3-Clause "New" or "Revised" License
13 stars 13 forks source link

Unable to find mixin #46

Closed Hecatoncheir closed 8 years ago

Hecatoncheir commented 8 years ago

Hi. I have new trouble to port polymer element. When I run: pub run custom_element_apigen:update gen.yaml

I get unhandled exception: 3 of 9: lib/src/wysiwyg-e/tools/blockquote.html Unhandled exception: Unable to find mixin WYSIWYG.ToolBehavior. Make sure the mixin file is loaded.

In gen.yaml I add this file to files_to_load section:

files_to_load:
    - lib/src/wysiwyg-e/wysiwyg-tool-behavior.html
files_to_generate:
    - wysiwyg-e/wysiwyg-tool-behavior.html
    - wysiwyg-e/wysiwyg-tool-styles.html

    - wysiwyg-e/tools/blockquote.html

What am I doing wrong?

jakemac53 commented 8 years ago

It looks like the behavior implementation is missing the @polymerBehavior comment (see here). It needs to have a comment like this so that hydrolysis can find the behavior.

jakemac53 commented 8 years ago

Oh also you shouldn't need to relist it in files_to_load, anything in files_to_generate should get loaded. It was just unable to recognize the behavior at all.

Hecatoncheir commented 8 years ago

Thanks you.