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 requiring a specific export #23

Open
dantman opened this issue Feb 13, 2015 · 3 comments
Open

Support requiring a specific export #23

dantman opened this issue Feb 13, 2015 · 3 comments

Comments

@dantman
Copy link
Contributor

dantman commented Feb 13, 2015

Like "aliases" I think preferences should have a spot for requiring a specific exported method/class.

For example something like this in preferences:

"export": {
  "util": {
    "format": "fmt"
  }
}

Would add to the dialog a "util:format" that would export [var ]fmt = require('util').format.

@ganemone
Copy link
Owner

This might be better solved with #26

@dantman
Copy link
Contributor Author

dantman commented Feb 25, 2015

I think the implemented result should probably be a fusion of both.

#26 works implicitly and with multiple variables. However it fails if exports are not defined in-file. And it doesn't provide a way to alias variable names.

So I think #23 would end up as an extension to #26 that allows you to A) alias variable names, and B) add extra variable names when they cannot be extracted from the module.

@ganemone
Copy link
Owner

I can get down with that

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

2 participants