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

Project restructuring sandbox #331

Closed
5 tasks done
kaisalmen opened this issue Mar 18, 2022 · 10 comments
Closed
5 tasks done

Project restructuring sandbox #331

kaisalmen opened this issue Mar 18, 2022 · 10 comments

Comments

@kaisalmen
Copy link
Collaborator

kaisalmen commented Mar 18, 2022

This issue covers "Required next work:" from #315

I will start a new branch and test things (sandbox-331).

@kaisalmen
Copy link
Collaborator Author

@CGNonofr We have GitHub Actions! 🎉

@kaisalmen
Copy link
Collaborator Author

@CGNonofr do you favor separating the node example into a real server and client part?
The workspace structure I have in mind is:

packages/client // npm module
packages/example-node // server part
packages/example-client // browser client
packages/example-browser // complete in browser

Would you be open to moving away from webpack to vite?

@CGNonofr
Copy link
Collaborator

To not poluate the root folder with too many subfolders, I would have put everything inside an example folder

packages/client // npm module
packages/example/node // server part
packages/example/client // browser client
packages/example/browser // complete in browser

(Even If I'm not sure about the relevance of the browser example)

I see no problem from mergeing to whatever bundler you want, but is there is reason? is there an issue with webpack?

@kaisalmen
Copy link
Collaborator Author

(Even If I'm not sure about the relevance of the browser example)

Let's not waste what is already there, right?

Currently webpack build is broken on my branch after upgrading versions. vite is just fast and easier to handle, but that's personal preference, of course. We don't need production builds for the examples and here plain node (server) and vite for client/browser related stuff is faster and easier to configure.

@CGNonofr
Copy link
Collaborator

Let's not waste what is already there, right?

If it creates more confusion than it adds value, why not?

No problem for vite if it's easier for you

@kaisalmen
Copy link
Collaborator Author

@CGNonofr Making good progress now. client itself and examples/node and examples/client have been stripped of unneeded dependencies. Using monaco-editor now in the client example!

@CGNonofr
Copy link
Collaborator

CGNonofr commented Apr 5, 2022

Will you do a single PR including all your changes?

What do you expect the work to be done?

@kaisalmen
Copy link
Collaborator Author

Will you do a single PR including all your changes?

I fear yes, because I don't know how to separate the things properly.

What do you expect the work to be done?

Maybe today you can have a first look (draft PR).

@kaisalmen
Copy link
Collaborator Author

kaisalmen commented Apr 6, 2022

@CGNonofr Ok, all examples work: https://github.com/TypeFox/monaco-languageclient/tree/sandbox-331
I need to update the README and will then open a draft PR.
If you want to test it yourself (gitpod configuration is already adjusted). Locally, best with separate repo checkout/clone:

# this needs to be done 
npm i
# cleans and compiles everything
npm run build 
# start the node LS server embedded or external
npm run start-example-node
npm run start-example-node:ext
# run vite in debug mode for both client based examples
npm run dev

Actually for vite to work the client and browser example don't need to be compiled.
I have created a new project monaco-editor-workers that is used to configure workers (classic or module workers) in the MonacoEnvironment , so no-one needs to think about this stuff. It is applied in the client and browser example.

@kaisalmen
Copy link
Collaborator Author

Resolved with #340

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