-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update build system to use jspm and allow using typescript for polymer components. #31
Conversation
02e6114
to
0752caa
Compare
Just pushed a change that allows writing the polymer component definitions fully in typescript with the PolymerTS library. |
So I just removed my typings folder and switched into this branch, I ran
So I closed the server and now I can't
what am I missing? |
you need to upgrade typescript, e.g. |
which i assume is telling me to do:
which returned without error, but didn't say anything I get the same error when I try to run |
16b45f4
to
b18174a
Compare
Rebased off the latest master. @joshmutus, can you take a look now? |
@@ -0,0 +1,195 @@ | |||
import {RegistryApi, RegistryListing} from '../scripts/registry'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a bit odd that the scripts for the polymer elements aren't in the /scripts
folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe; I wanted to keep them close to the html files because they're tightly coordinated with each other. We can certainly discuss reorganizing things.
This looks really nice and will help things scale nicely. |
yeah, thanks for the reminder about the README. will fix. |
b18174a
to
8a328a9
Compare
Updates the gulp build setup to use jspm instead of webpack for bundling dependencies. This lets us use the typescript compiler directly instead of a webpack plugin, which also fixes #16 because typescript errors get reported by the typescript compilation step, not swallowed by the webpack plugin. We still need to use bower for third-party polymer elements, unfortunately (see Polymer/polymer#1133), but I hope that issue will be resolved soon and we can just use jspm, which seems to be becoming the de facto standard for browser package management. This does however allow us to define the code for our own polymer elements in typescript, so we can import code from other modules and use it, without having to duplicate logic in plain javascript in the element html files. I've also added the tsd definition files to version control so that users will not have to mess with tsd in order to use the project.
If you check this out, you'll might have to remove the existing
typings/
folder since the branch will want to overwrite some of the files. I'd suggest renaming the existing folder so you can rename it back when you switch back to another branch, at least until this is merged. In addition, you'll have to runnpm install -g jspm && jspm install
to get jspm set up. Before merging this in I'll add that to the setup instructions in the README.