Polymer / old-docs-site

Old Polymer site. Replaced by these repos: polymer-project.org, polymer-library-docs
https://www.polymer-project.org
1.02k stars 2.43k forks source link

Try Polymer example codes contain unrefered files. #2602

Open jongmana opened 6 years ago

jongmana commented 6 years ago

It seems to me that the code examples like the custom-element example of 3.0/start/samples/custom-element/ have two issues. 1) When one follows the StackBlitz link on the documentation site, there is an index.js file that wasn't mentioned on the documentation site; If I delete it I'll get an error that index.js is missing. For me it's unclear whether this file is required by Polymer or by StackBlitz. 2) The custom-element file is "custom-element.js" the index.html however doesn't import that file but rather "custom-elements-es5-adapter.js", which is confusing for people starting with polymer (coming from Polymer 2.x, so I expected to import custom-element.js in the index file). The confusion might also be triggered because the element is called Custom-Element and the library imported is custom-elements.

arthurevans commented 6 years ago

Thanks for the feedback. Index.js is indeed required by stack blitz, and the custom elements adapter, is required when transpiling to ES5, which stackblitz does for us.

I think we can add some comments to explain the difference between the samples shown on the site and in stackblitz.