-
Notifications
You must be signed in to change notification settings - Fork 407
Distribute closure externs for Zone #727
Comments
@alexeagle , I would like to make this file, and add test cases to make sure it is ok through optimized: advanced for closurescript compiler. But I am totally new to closurescript, so please help me to review my work after I made the PR. |
Hi! A bit of context. Ideally this extern file should be generated from the TS sources, by github.com/angular/tsickle - this is what we do internally at Google. But I think this is probably out-of-scope for this issue; we can hand-edit the externs file for now. @mhevery might have some opinion about whether the API is stable enough that we'll rarely have to update the externs. Testing is the right thing to do. Here's where the material2 project added a test, but it only verifies that compilation succeeds, not that the application can access the library APIs at runtime: (by the way, closurescript isn't a thing - there is clojurescript which is actually a different language, that confusingly produces code that can be consumed by closure compiler. closure != clojure) |
@alexeagle , Thank you so much for all those information, I will try to understand and build the externs file by hand.
Thank you for pointing that out! |
You don't need to rebuild the externs file, the one I pointed to works fine.
…On Sat, Apr 8, 2017, 11:39 AM JiaLiPassion ***@***.***> wrote:
@alexeagle <https://github.com/alexeagle> , Thank you so much for all
those information, I will try to understand and build the externs file by
hand.
(by the way, closurescript isn't a thing - there is clojurescript which is
actually a different language, that confusingly produces code that can be
consumed by closure compiler. closure != clojure)
Thank you for pointing that out!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#727 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5I5w_tcKbLaOq-2jQ0e-B0i1iWopQks5rt8ZlgaJpZM4M3RkB>
.
|
@alexeagle , got it, I will just build the test cases and let you review later, thank you! |
I think hand coded externs file is fine for now. |
@mhevery ,got it,I have made a new one based on @alexeagle 's version, I will make a PR to let you review later. |
awesome
…On Mon, Apr 10, 2017 at 3:54 AM, JiaLiPassion ***@***.***> wrote:
@mhevery <https://github.com/mhevery> ,got it,I have made a new one based
on @alexeagle <https://github.com/alexeagle> 's version, I will make a PR
to let you review later.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#727 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAG1T5p0-sqfkXvbakzwiVlFA8juNCdmks5rugpfgaJpZM4M3RkB>
.
|
@alexeagle , @mhevery , I have made a PR #731, please review.
|
Since Zone.js is a "prollyfill" and since multiple angular apps might be on a single page, we don't want to bundle it together with the app.
This means closure compiler needs an externs file to avoid renaming Zone's symbols.
I currently have such an externs here:
https://github.com/alexeagle/closure-compiler-angular-bundling/blob/master/vendor/zone_externs.js
but it should be distributed with Zone.js so that users don't have to fetch it themselves.
The text was updated successfully, but these errors were encountered: