Skip to content

Instantly share code, notes, and snippets.

@mbykovskyy
Last active August 29, 2015 14:06
Show Gist options
  • Save mbykovskyy/5f85c85288e153596be3 to your computer and use it in GitHub Desktop.
Save mbykovskyy/5f85c85288e153596be3 to your computer and use it in GitHub Desktop.
Some issues that need to be considered

Scenario: Imports not included in a file

<!-- foo.hbs -->
<bounce-animation></bounce-animation>
  • Where this component comes from polymer_components or bower_components?
  • What about components that live in files with identical names? For example, cool-animations/bounce-animation.html and my-animations/bounce-animation.html
  • What if component lives in a file with a different name? For example, cool-animations/animations.html

Conclusion: It makes it difficult to decide where component comes from. We could introduce conventions like file name has to be the same as component name but there are components that don't follow such convention. Therefore, import has to be part of the same file where the component is used.

Scenario: Imports included in a file

<!-- foo.hbs -->
<link rel="import" href="cool-animations/animations.html">
<bounce-animation></bounce-animation>

<!-- bar.hbs -->
<link rel="import" href="my-animations/my-animations.html">
<bounce-animation></bounce-animation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment