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

Feature request: Support npm in extensions #202

Open
idleberg opened this issue Jun 23, 2022 · 2 comments
Open

Feature request: Support npm in extensions #202

idleberg opened this issue Jun 23, 2022 · 2 comments

Comments

@idleberg
Copy link

Among programming languages, JavaScript has the biggest eco-system in the world. Hence, Brackets would benefit from this if extensions could load packages from npm. Right now, developers need to build obscure build-pipelines or make use of workarounds to load "external" code.

@idleberg idleberg changed the title Feature request: Use node_modules in extensions Feature request: Support npm in extensions Jun 23, 2022
@abose
Copy link
Member

abose commented Jun 24, 2022

Hi @idleberg . Thanks for the feature request. We are already working on a new extension manager based on NPM. Ie, ability to publish and load extensions directly from npm.

But to gain more clarity, can you describe the workflow or provide more details of the feature you have in mind.

@idleberg
Copy link
Author

idleberg commented Jun 25, 2022

Well, I see two ways to handle this:

  1. When a user installs a package, Brackets runs npm install --omit=dev to satisfy dependencies (this is how Atom does it)
  2. When a developer publishes or updates his extension, dependencies are included in the archive. I think this is how VSCode does it, but I wonder how that would work for Node packages with native bindings.

Either way, as a consequence an extension script could import modules as you would do in a standard NodeJS script. IIRC, Bracket exposes require that has no awareness of node_modules.

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

No branches or pull requests

2 participants