-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create bundle d.ts file #1
Comments
You just need to create an angular2-polyfill.ts file at the root of your project that exports all of the other modules, like I did for ng2-translate: https://github.com/ocombe/ng2-translate/blob/master/ng2-translate.ts Then when you call import {SomeModule} from "angular2-polyfill/angular2-polyfill"` |
@ocombe Thanks for the suggestions. It seems that it works correctly when the module is installed via npm. If it is installed with JSPM, the user needs an extra bundled |
Referencing: In that proposal |
@unional Not even for type definitions distributed via DefinitelyTyped? I'm not using |
I'm using To my understanding, yes. See the third paragraph in the Background section:
One way is go for the proper external module, adding It is an on-going discussion. |
Hmm interesting that it doesn't work with jspm, I need to take a look at that to find the proper setup that works for everything. |
Jup, can't find a decent way of doing that other then manually bundle them... |
TypeScript actually allows to compile its output in a single file. The gulp-typescript plugin allows to output declaration files independently. Therefore, I created a gulp task to output that file in the bundles folder (see PR #27 ). Hope this is what you were after. |
Just realized the root module name is src and not angular2-polyfill.. This appears to be a new fature of TypeScript. |
Thanks @Ledragon for looking into it! |
My pleasure! |
The TypeScript compiler creates a typedefinition file for every
.ts
file separately. When distributing the library, we need to generate one.d.ts
file that describes all our modules. This file can then be added in thetypings
directory when developing withangular2-polyfill
.I guess it has to be distributed via DefinitelyTyped afterwards.
For example, the
angular2-polyfill.d.ts
file would look like this.The text was updated successfully, but these errors were encountered: