Strip off the srcPath when generating output - feature request
- Dominant language
- TypeScript
- Stars
- 14.4k
- Forks
- 671
- PR merge metrics
- No merged PRs in 30d
Description
## Currently
When specifying a srcPath, the path elements become part of the output generated.
For example if you had a large project and you wanted to run Mitosis at the project route and look into `a/b/c/d/somewhere` as input, the output will end up deeply nested with `a/b/c/d/somewhere` in its path.
## Feature request
Strip off the srcPath when generating output, so that the src or other similar directories don’t become part of the output path; one should be able to move the Mitosis input around the filesystem **without** affecting Mitosis output.
This change would not be noticed in small trivial projects, but is of important when integrating into a larger build tool/build system.
## Workaround
Wrapper script to `cd` and run Mitosis from wherever the input is.
(This is a very common technique when integrating a tool into a build system.)
Contributor guide
Research direction
Start by tracing how Mitosis resolves srcPath and constructs generated output paths, then inspect the CLI or build-system entry point that receives the input directory. Verify the behavior by running the tool from a project root and from a relocated input directory; done means the generated output no longer includes the srcPath's parent elements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100