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

Refactor react-union-scripts structure #110

Open
wafflepie opened this issue Sep 3, 2018 · 2 comments
Open

Refactor react-union-scripts structure #110

wafflepie opened this issue Sep 3, 2018 · 2 comments

Comments

@wafflepie
Copy link
Collaborator

wafflepie commented Sep 3, 2018

There are a couple of points that I'd like to address:

  1. Rename the lib folder to something like utils.
  2. Move the unionConfig handling code from utils to a separate package (or at least a separate folder or file).
  3. Move webpack.config.js along with the parts to a separate package or a separate folder (or even a file, that would be sufficient).
  4. I don't understand the point of having a separate startDevServer.js file, just merge it with the start.js file.
  5. The scripts directory is a mess of multiple types of files. I'd like it to be a directory with the possible entry points for react-union-scripts and nothing else (test, build, start, that's it).
  6. In my react-union-ssr-server package, I would like to use a couple of useful functions from react-union-scripts (namely the CLI getArgValue function), it makes me think whether we should have a react-union-utils or a react-union-cli package – more small packages will lead to looser coupling and more maintainable code.

The code itself is pretty good, but the directory structure needs a major revamp.

@tommmyy
Copy link
Collaborator

tommmyy commented Sep 4, 2018

I will look into that. Not everything is priority. We have plans with union-scripts which makes this possible refactor just temporary. But thank you for comments.

@wafflepie
Copy link
Collaborator Author

Okay, I'll try to stay away from doing any major refactoring in the ssr branch and will only leave comments as to what should be improved so that we don't forget about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants