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

Support browserify; get rid of dynamically loaded dependencies #55

Open
jleppert opened this issue Jun 10, 2015 · 1 comment
Open

Support browserify; get rid of dynamically loaded dependencies #55

jleppert opened this issue Jun 10, 2015 · 1 comment

Comments

@jleppert
Copy link

Or at least allow overriding of this behavior. I'd like to use this on the client and server, but as written it doesn't work with browserify, due to the behavior of loading schema validators dynamically:

In lib/suites/draft-04/index.js, line 122:

  // test all applicable schema properties
  var props = getApplicableTests(config);
  for (var index = 0; index < props.length; ++index) {
    var prop = props[index];
    var fn = require('./keywords/' + prop + '.js');
    errors = errors.concat(fn(config));
  }

Browserify can't resolve these because they are evaluated at run-time. Would it be possible to add a configuration option to override this and support your own (static) requires implementation that would work with frontend delivery tools like browserify better?

I can submit a PR if this is something that would be accepted.

@sholtomaud
Copy link

What happened with this issue?

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

2 participants