Skip to content
This repository was archived by the owner on Dec 7, 2017. It is now read-only.

Please consider adding main to package.json #63

Open
dkrutsko opened this issue Jul 29, 2016 · 1 comment
Open

Please consider adding main to package.json #63

dkrutsko opened this issue Jul 29, 2016 · 1 comment

Comments

@dkrutsko
Copy link

dkrutsko commented Jul 29, 2016

Hey there, I'm currently experimenting with this tool through webpack but I ran into an issue. It looks like I can't directly require html-inspector in if I get it through NPM. Since it's not uncommon for websites to use NPM exclusively these days for all their modules, I'd like to know if you could make this tool work with NPM as well. As far as I know, it should be as easy as adding a "main" object to the package.json file.

In addition to the require issues, it might also be necessary to properly export the symbols instead of polluting the global namespace. So the result could be as simple as:

require ("html-inspector").inspect();
@philipwalton
Copy link
Owner

I've been meaning to upgrade this tool for a while, but since I don't actively use it anymore (I no longer work at the company I built it for), I haven't been able to find the time.

I'd happily accept a pull request though if you or anyone else wants to contribute. Getting it working with npm and module loaders is absolutely something I'd like to support.

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

No branches or pull requests

2 participants