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

Rojo - Add support for other importers #19

Open
Kampfkarren opened this issue Sep 19, 2019 · 1 comment
Open

Rojo - Add support for other importers #19

Kampfkarren opened this issue Sep 19, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed scope: ts

Comments

@Kampfkarren
Copy link
Owner

Right now, basic require statements will give you the members of that object.

However, it's come to my attention that a lot of people don't actually use require directly! It seems every framework comes with its own unique version of require to do slightly different things, as well as some on the side.

Notable importers/frameworks with importers:

Supporting all of these, especially custom ones, sounds like a real pain. Especially considering the bulk of the work on this extension comes from my own use cases, I wouldn't even know if there's bugs in them because I don't use any of these.

My ideas on how to solve these issues:

  • Do nothing on my part, and let the people who use these importers contribute code to support them (although if we get one, we should probably do some refactoring around it to make sure it's actually clean and modular).
  • Let users write custom Lua scripts to support their importer. This seems excessive, and I'm not sure it would be very user friendly either since they'd have to traverse the AST probably!
  • Do nothing at all and don't officially support any importers.
@Kampfkarren Kampfkarren added enhancement New feature or request help wanted Extra attention is needed scope: ts labels Sep 19, 2019
@Kampfkarren
Copy link
Owner Author

@evaera gave a good suggestion: we could document some JavaScript API and let users create a JavaScript file somewhere in their workspace that exports functions that the extension will interact with.

Would have to figure out the best way to go about this though in a way that hopefully avoids people having to use luaparse or something similar. I'm pretty sure we can make the assumption that you're going to be using a function, and then we can have users write in their scripts what function they're going to use? 🤷‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed scope: ts
Projects
None yet
Development

No branches or pull requests

1 participant