Prettier for File Structures
Destiny is in early development so you might encounter bugs or miss important features. If you find a bug or miss a feature, please don't hesitate to reach out via a pull request or issue .
What does this do?
- Scans a folder for all the files in it
- Creates a fractal representation of the graph (following similar rules outlined here: https://hackernoon.com/fractal-a-react-app-structure-for-infinite-scale-4dab943092af )
- Moves existing files into the fractal structure
- Fixes imports
- Removes all empty folders
- Prints files that are "unused" (not imported by anyone and doesn't import anything)
The end result is a "prettified" file structure.
- This is a work in progress and 100% has bugs of some kind in it
- BEFORE running this tool on your codebase, make sure you have commited to git or made a backup (I don't expect the tool to destroy your work (although it's possible), but just in case you don't like the results)
- Snapshot tests don't format correctly
How to run it
npx destiny src/**/*.*
This tool might be useless
It might be better to just name your folders.
Why did you name it destiny?
pull requests are welcome :)