Not working with angular 2.0.0
Can you elaborate?
Well, the current angular2-websocket.js is in AMD format. Angular 2 switched to UMD's, so it needs certain processing if not packed with a bundler. For example, I do my packaging by hand (poor man's webpack) and I have to manually edit the file to convert the require calls into a System.amdDefine.
It works fine for me, but I use SystemJS. Can you submit a PR with the changes you need?
Yes, SystemJS can take AMD modules. That's why. Angular 2 has removed dependencies on SystemJS and should now, theoretically, work with any module loader. That's the reason behind the switch to UMD module format. Before beta, Angular 2 at a time was tied to SystemJS, so all their modules were standard SystemJS format. It worked fine because people at that time had no choice -- use SystemJS.
I suppose you should simply ask TypeScript to generate UMD modules and be done with it. That should make sure it works in a wide variety of module loaders.
Or separate different versions, such as angular2-websocket.amd.min.js, angular2-websocket.umd.min.js etc.
I'm not the developer here, @afrad is. So he can step in here and comment on what he's willing to do, or you can submit a PR on what you want done instead of describing what you want done.
Didn't want to interrupt the discussion. @schungx all makes sense to me, could you please submit a pr?
Sorry! Not very familiar with this Git thing...! Am a Windows kind of person.
Can you simply turn the module format in tsconfig.json to umd?
@schungx You are forgiven for being new to Git. PR = pull request. Essentially, you can fork this repository, make the changes to it that you want to see, and submit a pull request to this repository to merge those changes in. If @afrad is cool with your changes, he'll merge them in.