Comments (7)
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 todemo/index.html
.
from typescriptsamples.
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.
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.
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.
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
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.
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.
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)
- Why is super() called twice in the sample of Todo app? HOT 3
- mind if i add an express.js restful api?
- node_modules/angular2/src/core/facade/promise.d.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module. HOT 1
- Angular2 package uses TS 1.5.*, update to 2.x HOT 1
- todoMVC doesn't work fine when "super(options)" is moved to the first line
- Webpack babel sourcemap issue question HOT 1
- jspm sample is out of date HOT 3
- --allowJs option - JavaScript as input files sample
- WebSite: 404 for BS web font (woff2)
- Uncaught TypeError with a local copy of d3-v4
- Update react-flux-babel-karma example to use Webpack 2
- what is exactly the "start" command? HOT 1
- Can we have an example that builds a node package of components for use in a SPA HOT 3
- No licence information? HOT 3
- TodoMVC example doesn't works on Safari HOT 1
- missing Project references example HOT 1
- Request a sample showing a project that targets Node and the Browser without an external bundler
- Reference to jquery remains in the jsx sample. Sample not working HOT 2
- Failure compiling on c++
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescriptsamples.