destiny icon indicating copy to clipboard operation
destiny copied to clipboard

Glob stays in the tree's root path

Open AnatoleLucet opened this issue 5 years ago • 9 comments

The root file of the tree is src/**/*.*, it should probably be a simple src.

AnatoleLucet avatar Feb 28 '20 22:02 AnatoleLucet

What would you expect in cases like "**" or any other more open glob then?

The cli shows that the user inputted and what the result of that input was.

sQVe avatar Feb 29 '20 08:02 sQVe

Yes you're right, I haven't thought about that. We will keep it that way then.

AnatoleLucet avatar Feb 29 '20 13:02 AnatoleLucet

The alternative would be to show the shared parent

benawad avatar Feb 29 '20 14:02 benawad

@benawad That is somewhat confusing when folders are ignored. It would look like we want to remove them.

sQVe avatar Feb 29 '20 15:02 sQVe

I'd say we have two alternatives. Either we keep it like it currently works or when a glob is inputted we get all root paths of that glob. That would probably be pretty clear to the user.

sQVe avatar Feb 29 '20 15:02 sQVe

That is somewhat confusing when folders are ignored. It would look like we want to remove them.

What about something like this:

src
├──index
│  ├──formatFileStructure
│  │  ├──fixImports
│  │  │  └──makeImportPath.ts
│  │  ├──fixImports.ts
│  │  ├──moveFiles.ts
│  │  └──removeEmptyFolders.ts
│  ├──generateTrees (ignored)
├──shared
│  └──logger.ts
└──index.ts

generateTrees (ignored) in a gray color?

AnatoleLucet avatar Feb 29 '20 15:02 AnatoleLucet

I like it

benawad avatar Feb 29 '20 22:02 benawad

I fixed the log with the glob pattern. How do you see the implementation of the ignored files? I need some more information before this could actually be implemented.

  • Is it graying out the ignored files?
  • Is it graying out a folder that contains only ignored files?
  • Is it graying out unused files?

Perhaps we need to make another issue since it looks more like a feature then a bug?

SimonJang avatar Mar 11 '20 14:03 SimonJang

@SimonJang It would be nice if all the cases you described are logged as ignored files/folders. If a folder is ingored or all his files are, it should just log the folder name in gray with the (ignored) suffix. It shouldn't log his child(s) only the folder name.

We will keep this issue for now, I've changed the labels.

AnatoleLucet avatar Mar 11 '20 14:03 AnatoleLucet