Skip to content
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

Avoid dynamic require to support using it in chrome app runtime by browserify #3

Open
hackwaly opened this issue Jan 22, 2015 · 5 comments

Comments

@hackwaly
Copy link

The "index.js" file breaks browserify. Could you please change it to static require?
Currently I have to manually fixed as follow.

var fs = require('fs'),
    path = require('path');

[
  require('./lib/server'),
  require('./lib/client'),
  require('./lib/Agents')
].forEach(function(exp) {
  var keys = Object.keys(exp);
  for (var i = 0, len = keys.length; i < len; ++i)
    exports[keys[i]] = exp[keys[i]];
});

exports.auth = {
  None: require('./lib/auth/None'),
  UserPassword: require('./lib/auth/UserPassword')
};
@mscdex
Copy link
Owner

mscdex commented Mar 15, 2015

I'd be open to a PR to fix it. The auth methods should probably be done similarly at least for consistency.

@kennysong
Copy link

Had the same issue as above. I can help fix this, but is there relevant documentation somewhere about why the current index.js doesn't work? I'm not super familiar with the internals of require and browserify.

@darky
Copy link

darky commented Mar 4, 2016

@mscdex, can you simply copypaste @hackwaly code, release new version and close this issue?
It can be done via browser through github.
You spent time on this slightly more than read this message.

@darky
Copy link

darky commented Mar 4, 2016

Afraid npm publish
Ok, this spent time slighly more than slighly more than read prev message

@reverofevil
Copy link

@mscdex Could you mark in a README that the project is abandoned and is looking for a new maintainer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants