Open aminya opened 3 years ago
npm package for serve-d? I was thinking of moving the download & update code from code-d into an npm package, which downloads releases from GitHub releases like currently done. Otherwise it would be duplicate maintenance effort to publish releases to GitHub and to NPM.
The code for code-d exists and I think abstracting it to be usable in any JS-based editor would be useful and allow updates at runtime.
Do you think it would be worth the effort to publish binaries to NPM when there are already existing GitHub releases?
Most of the language servers are available from npm: https://www.npmjs.com/search?q=language%20server
The issue with GitHub releases is that the installation, updating, etc needs to be done manually instead of relying on npm.
I am fine with any approach as long as this management becomes abstracted.
I made a very compact code to manage the binaries. I think we can integrate it into serve-d
and publish it as a npm package.
Package time script: https://github.com/Pure-D/atom-ide-d/blob/main/scripts/get-servers.ts
Runtime installer: https://github.com/Pure-D/atom-ide-d/blob/main/src/installation.ts
does this code work? it's cast to a boolean below which would return true here.
Oh, yeah that should be false
instead of -1
. Fixed now.
Another thing to improve is to build from source automatically for other operating systems or architectures. https://github.com/Pure-D/atom-ide-d/blob/999dd68672318c6b0584bf095431df5bfd95cbb3/src/installation.ts#L83
As discussed, given the complexity of downloading, checking for the versions, building from source, etc., we should look into making an npm package for
serve-d