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 a commonjs-enabled environment #73

Closed
stephenmathieson opened this issue Jul 16, 2013 · 3 comments
Closed

support a commonjs-enabled environment #73

stephenmathieson opened this issue Jul 16, 2013 · 3 comments

Comments

@stephenmathieson
Copy link

it'd be quite useful to include codesniffer in a few of my applications for testing purposes. unless there are any objections, i'd like to get around to adding support for a commonjs-style require of codesniffer. thoughts?

@luketw
Copy link
Member

luketw commented Jul 17, 2013

Hi Stephen,

I believe the PhantomJS code that was originally contributed by one of my colleagues [to me, not when it was posted on here] was written at a time when PhantomJS did not support CommonJS modules, but it appears that PhantomJS 1.7+ does now support them, and I think that for encapsulation's sake - if for our PhantomJS runner at least - it would be a good idea for running customised scripts based on that runner.

If you are expecting a CommonJS module that can be used in other interpretations of CommonJS (like node.js), then I'm not sure that will work. I can't say for sure, but it's unlikely due to our dependence in that script for PhantomJS' headless browser.

Thank you for the suggestion.

Regards,
Luke

@ironikart
Copy link
Contributor

Adding a cross reference to #166 and #171.

@ironikart
Copy link
Contributor

Resolved with f79cf0a. It should be noted that HTML_CodeSniffer still requires a browser environment which means that requiring it directly in Node will still result in an error.

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

No branches or pull requests

3 participants