-
Notifications
You must be signed in to change notification settings - Fork 670
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
Browser support #288
Browser support #288
Conversation
… data news to use base class, added backwards-compatibility layer
…karma tests (not fully working)
…currently having issues, re-enabling tests for things that seem to be working now
Also fixed the tests - they were "completing" before ever checking the results - and added a couple more tests
everything is now hyphenated so you can do: require('watson-developer-cloud/tone-analyzer/v1') instead of require('watson-developer-cloud/tone_analyzer/v1')
Changes look OK for me. Great job btw. What if we remove the solr-client dependency. We can ask users to install it if they want to use Retrieve and Rank but having it as a dependency for all our users doesn't make sense. |
I don't think I agree about solr-client. If it's necessary to use that part of the library, then it should be included as a dependency automatically. But, if a user does, for example As for excluding non-CORS services from browserify.. that's not a bad idea, but I think we can punt it for now. (And hope that they all support CORS in the near future...) |
makes sense. |
This still needs a little cleanup before shipping, including:
But, I'm creating the PR now in hopes of getting some review from @germanattanasio, @jzhang300, @kognate, and anyone else interested in commenting.
Summary of changes
require()
'd and instantiated individually - this allows it to be compatible with browserify and also enables smaller bundles that don't include the entire librarylib/index.js
, but allowed service-specific hacks to be moved into their own files.getToken()
without specifying the URL again.Things I didn't do in this PR, but might like to slip into a v2 release:
request
-specific features. We lean pretty heavily on request, but being able to switch it out with something like axioz or possibly just using fetch client-side and a pollyfill in node would be handy.v0.12
. It's near EOL, and would allow us to use a bit of es6 sugar in the library. Not a bit deal to me though.Some of this can slip to
v3
- I'd be interested in feedback on what you think makes sense forv2
vs waiting on.Tickets
This PR resolves https://github.ibm.com/Watson/developer-experience/issues/234 and https://github.ibm.com/Watson/developer-experience/issues/311 on GHE.
Also, on this repo, it
Fixes #30
Fixes #225
Fixes #204
Relates to #283