awesomejs.dev
awesomejs.dev copied to clipboard
An "Install Package" Button (with companion service)
Is your feature request related to a problem? Please describe. I think my workflow could be faster if I had a button that would let me install the listed package when I'm on the UI. And perhaps even provide indication if the package is already installed (locally or globally)
Describe the solution you'd like A clear and concise description of what you want to happen. In order to "npm install" packages, access is needed to the client's filesystem. So, most likely a companion service (NodeJS) would need to be running listening for the "addPackage" requests. So, an "Add Package" button would only appear if that service is running.
Clicking the "Add Package" button would prompt if the user wants to install globally or locally and would either run npm i [package-name] or npm i -g [package-name]. "Add Package" would also just need to know/remember the user's project directory for installing locally.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
I mostly use the command line, and this is pretty fast for me. However, I think having the control on the UI would help me work faster. Plus, if I have a history of packages I've installed in the past (say, some from project A, others for project B), it may be useful if I could refer back to that list. While I know I could just use my package.json files, it can turn out to be 10-20 package.json files I look through.
Additional context Add any other context or screenshots about the feature request here.
Suggested screenshot

The feature is almost already here 😸 Currently it works when awesomejs is embed in guijs, but I also plan to support using it in your default browser. https://github.com/Akryum/awesomejs.dev/blob/dev/packages/frontend/src/components/pkg/PackageInstallButton.vue https://github.com/Akryum/awesomejs.dev/blob/dev/packages/frontend/src/components/pkg/PackageInstallationManager.vue
Ok my apologies, I should have checked dev branch before posting. Sounds cool. Look forward to it!