Giter Site home page Giter Site logo

Comments (7)

DanielRosenwasser avatar DanielRosenwasser commented on June 26, 2024

Hey @gertcuykens we're definitely up for taking a Polymer sample. We recently did some work to ensure custom elements could be created (which you can check out in our nightlies).

That said, I am not a Polymer expert, so you'll have to fill in some of the blanks for me. 😄

  • What exactly is hello-world-es.ts?
  • What is the tmp folder for?
  • Is there a reason hello-world.html isn't in the same folder as the TS components?
  • Can you normalize from tabs to spaces here and here?
  • What is the root index.html for? Looks like you're already pointing to demo/index.html.

from typescriptsamples.

gertcuykens avatar gertcuykens commented on June 26, 2024

Thanks,

  • hello-world-es.ts is a example how to make a plain vanilla es6 web component element without polymer or anything just es6
  • hello-world-dc.ts is building a web component element using polymer decorators
  • hello-world.ts is building a polymer web component element without decorators

tmp is the polymer team trying to figure out typings and is the most important part you should take a very good look at and collaborate with the polymer team. My knowledge is way too small to make sure the polymer team is doing it correctly.

Everything else is not so important right now and is just the way polymer represent their elements into a catalog https://elements.polymer-project.org basicly index.html is just a fancy way to document elements but is still work in progress for the new polymer 2.x and doesn't work yet :)

from typescriptsamples.

gertcuykens avatar gertcuykens commented on June 26, 2024

The tmp files are copies from https://github.com/Polymer/polymer/tree/2.0-typescript

Please collaborate with the polymer team directly if you notice errors, i am just a hello world messenger :)

https://github.com/Polymer/polymer/pull/3954/files

from typescriptsamples.

DanielRosenwasser avatar DanielRosenwasser commented on June 26, 2024

I think we'll have to wait for Polymer/polymer#3954 before we pull in samples to understand how they should be consumed.

from typescriptsamples.

gertcuykens avatar gertcuykens commented on June 26, 2024

Yep I agree but please verify if there defenitions are done the right way. For exampe when I look at it in vscode i get

image

I can't judge if does errors are bad or not or if they prevent a better typing experience for the end user. Just hoping that a typescript expert from Microsoft has also reviewed it just to be safe before it is being injected in the offical polymer branch.

from typescriptsamples.

gertcuykens avatar gertcuykens commented on June 26, 2024

I split the examples into two repositories because decorators are killing me to make a simple example work.

So this one is ok https://github.com/gertcuykens/hello-world and only needs a few more extra typings, but that I can probably figure out myself.

Decorators on the other hand are a disaster for me to setup correctly https://github.com/gertcuykens/decorators I am trying for days now to make this work, asked stackoverflow and any developer I could find to help me on this.

http://stackoverflow.com/questions/39926208/polymer-2-x-typescript-decorators-example

from typescriptsamples.

gertcuykens avatar gertcuykens commented on June 26, 2024

Finally i figured decorators out... now the thing left is to understand umd vs polymer imd

https://github.com/PolymerLabs/IMD

from typescriptsamples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.