Webpack-cli: [UI] Setting up server project

Created on 17 Oct 2018  路  8Comments  路  Source: webpack/webpack-cli

The UI project will bootstrap a server that will serve the static resources that will be compiled from a different task.

The server, also, will be responsible of detecting all the requests coming from the UI and execute the different commands like

  • creating a new webpack configuration file
  • modify existing ones
  • ideally execute the builds givin a specific webpack

The webpack-cli should already have all the APIs ready for these kind of operations. If not, a refactor will needed in order to expose to achieve such features.

The goal of this is issue is to have a simple and good foundation of a server that we can bootstrap and ready to receive commands from the UI.

Feature Good First Contribution Help Wanted UI 馃暥 inactive

Most helpful comment

@webpack/cli-team We can now start developing endpoints. Anyone willing to collaborate on init endpoint with me.

All 8 comments

I would like to take up this issue. For the starters, I will make init functionality as laid out in the packages/ui-server package. How should one go about creating init for a non default scaffold ?

@ematipico @evenstensberg I am stuck on creating the init functionality. To achieve the creating of webpack config file, I was using child_process module, and communicating via the @webpack-cli/init using its spawn function. But there is difficulty in synchronisation of input and ouput. ( I am creating an output string and directly dumping it onto the child process's stdin. I would retry it once more by having seperate calls to the stdin.write() of child process. Is there any other alternative I can try (without refactoring other packages), or am I approaching this issue wrongly ??

Would you like to create a PR with the code so we can give some direction and try to understand the problem?

I don't think you need to use a raw child_process. You can use execa for that (we use it already for our tests).

@ematipico Sure thing. Lemme use execa in my code and I will send a PR.

@ematipico Please review the PR and confirm if I am on the right track. It is not the cleanest way to achieve the above task hence I am a little skeptical if I have understood the aim correctly. I will make the necessary changes as soon as possible so that we are making some real progress on this goal.

@webpack/cli-team We can now start developing endpoints. Anyone willing to collaborate on init endpoint with me.

@rishabh3112 I would like to help the init endpoint with you 馃憤

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

r00nscapenab picture r00nscapenab  路  4Comments

snitin315 picture snitin315  路  5Comments

billyjanitsch picture billyjanitsch  路  3Comments

evenstensberg picture evenstensberg  路  5Comments

evenstensberg picture evenstensberg  路  5Comments