lundegaard / lundegaard/react-union
Refactor react-union-scripts structure
Open
Nobody has claimed this yet.
low-priority
refactor
- Dominant language
- JavaScript
- Stars
- 96
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
There are a couple of points that I'd like to address:
- Rename the
libfolder to something likeutils. - Move the unionConfig handling code from
utilsto a separate package (or at least a separate folder or file). - Move
webpack.config.jsalong with the parts to a separate package or a separate folder (or even a file, that would be sufficient). - I don't understand the point of having a separate
startDevServer.jsfile, just merge it with thestart.jsfile. - The
scriptsdirectory 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). - 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by mapping the lib, utils, scripts, unionConfig, webpack.config.js, startDevServer.js, and start.js paths in react-union-scripts. Review the existing entry points and the CLI getArgValue function, then define a coherent package or folder boundary for each concern. Done means the requested structure is implemented without losing the test, build, or start entry points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- developer-experience, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100