TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

Allow not existing files for external modules #27

Closed tolemac closed 8 years ago

tolemac commented 8 years ago

When process the external imports may be that the file don't exists, then when you access to the property "file" of exportMap item and get an error.

I think the first to do is to check externals parameters, if externals is false you haven't if the file is excluded, and if 'externals' is false It may be that the file does not exist then you have to check p to access to p.file.

I'm generating .d.ts for ng-forward project and I have been problems with reactive/rxjs import, with these changes work fine.

basarat commented 8 years ago

@tolemac This project is without owner. Would you be willing to take over?

basarat commented 8 years ago

/cc @vvakame for approval (I already have all the access to be able to transfer it) :rose:

tolemac commented 8 years ago

@basarat I'm not sure about it. I don't have a lot of experience on open source projects. By the other hand this is a small project, may be a good start. If I need help or have any problem in the future, can I ask you? If you say yes, I also.

tolemac commented 8 years ago

According to autodts-generator readme TypeScript 1.8 implements the main goal of this project. Is correct?

basarat commented 8 years ago

@tolemac indeed. Also there is https://github.com/SitePen/dts-generator that I now personally use. But lately, even simpler just going with node module resolution : https://basarat.gitbooks.io/typescript/content/docs/node/nodejs.html

Maybe it isn't sufficient for people, or maybe there isn't much education, nevertheless I haven't had the need for this project lately

tolemac commented 8 years ago

I have been testing dts-generator and autodts and don't like them. I like dts-bundle because it start from a d.ts file, don't need tsconfig.json and exports only that I want.

To have this pull request would be nice.

basarat commented 8 years ago

@tolemac I've added you as a collab here. Feel free to merge the PR and own this project :rose:

I also wrote one possible workflow you can follow : https://medium.com/@basarat/possible-workflow-for-npm-module-contribution-8e6b3c54f4e2#.hpeefm6mi :rose: feel free to customize / ask for help.

Also added you as a collab on https://www.npmjs.com/package/dts-bundle :rose:

basarat commented 8 years ago

PS : sorry for the late reply :rose:

tolemac commented 8 years ago

Ok. I get down to work ;)