Open rchl opened 4 years ago
It sounds good to me. But I don't know what work is needed. Can you help? If you want to publish a new package, I think we need help from @jeddy3.
The first step would be separating the server into a separate repo. Or use monorepo. Whatever is a personal preference.
Then:
bin
property to package.json
files
property to exclude some unnecessary files (if there are any)I think it's difficult to separate the repo, because I think it's probably difficult to separate test codes. So I think it's better to use monorepo.
Personally I think working with monorepos is a pain.
I think another option is to just put server code in a separate directory (like server
) that would have its own package.json
and could be released to npm from that directory. One example of such setup is https://github.com/microsoft/vscode-eslint which is also a VS extension and language server in one repo
If you want to publish a new package, I think we need help from @jeddy3.
I've added you to the stylelint npm org so that you can publish packages under the @stylelint
scope. If you publish an unscoped package, invite jeddy3
, ntwb
and hudochenkov
to it. (Preference would be for a scoped package.)
I think another option is to just put server code in a separate directory (like server) that would have its own package.json and could be released to npm from that directory.
That approach must have merit if the Microsoft team do for their ESLint extension.
I've kick-started the progress with https://github.com/stylelint/vscode-stylelint/pull/141
I'm considering splitting the language server into a proper package in v1.2 since the refactored codebase in v1.2 makes it much easier to do this. However, I'm not certain yet, as I already have a lot of work cut out for me. If it makes it into v1.2, this issue will be added to the v1.2 project.
Thank you for the update.
is there any progress?
LSP servers by definition should be easy to reuse in various editors, without being locked-in to any specific one. A stylelint server was created for this extension but it's locked-in to the vscode extension only.
Extract the server part into a separate repo and publish as a npm package (for example
stylelint-language-server
). That would make it easy for both this extension to depend on it and for other editors to start using it.(I've adapted this server to work with Sublime Text editor (see related PR at https://github.com/sublimelsp/LSP-vscode-stylelint/pull/1) but it requires some extra work that shouldn't be necessary.)