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

Separate CLI into its own file #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

appsforartists
Copy link

I was getting syntax errors from Webpack because you start index.js with a hashbang. I broke out the core functionality into its own file to ameliorate this. The logic is all the same.

 - importable getter ("get_ip")
 - command line interface ("cli")
@dominictarr
Copy link
Owner

this is a bug in webpack not in this module. there are many node modules that have #! at the top, I recommend putting a pull request into webpack instead.

@appsforartists
Copy link
Author

Be that as it may, separating out the concerns of the module itself from those of the CLI is still a net gain.

Even if you disagree with the motivation, is there any harm in accepting the patch?

@dominictarr
Copy link
Owner

merging this would leave a bug in webpack, though. Not fixing that would be a far greater tragedy than my not merging this. ;)

@dominictarr
Copy link
Owner

p.s. this works in browserify, there is no reason it shouldn't be supported in webpack.
all that is needed is a regular expression that removes the #!...

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

Successfully merging this pull request may close these issues.

None yet

2 participants