benawad / destiny

Prettier for File Structures
MIT License
3.53k stars 79 forks source link

Nested main modules #164

Open Vakrim opened 3 years ago

Vakrim commented 3 years ago

Idea for this was presented in #163.

This PR adds option that allows to have module and its dependencies in the same folder.

❯ destiny --nest-main-modules
...
├── (login.js is moved from here)
└── login
    ├── login.js (and it's now here)
    └── search.js (at the same level with dependency)

You can see extended example in #163

codecov[bot] commented 3 years ago

Codecov Report

Merging #164 (c57771d) into develop (3cfab83) will increase coverage by 0.27%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #164      +/-   ##
===========================================
+ Coverage    92.97%   93.25%   +0.27%     
===========================================
  Files           22       23       +1     
  Lines          598      608      +10     
  Branches       141      142       +1     
===========================================
+ Hits           556      567      +11     
+ Misses          42       41       -1     
Impacted Files Coverage Δ
src/index.ts 68.57% <100.00%> (+1.40%) :arrow_up:
src/index/generateTrees.ts 100.00% <100.00%> (ø)
src/index/generateTrees/toFractalTree.ts 89.62% <100.00%> (+2.95%) :arrow_up:
...c/index/generateTrees/toFractalTree/getFileName.ts 100.00% <100.00%> (ø)
src/index/formatFileStructure/moveFiles.ts 86.20% <0.00%> (-6.90%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3cfab83...c57771d. Read the comment docs.