Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glob stays in the tree's root path #88

Open
AnatoleLucet opened this issue Feb 28, 2020 · 9 comments
Open

Glob stays in the tree's root path #88

AnatoleLucet opened this issue Feb 28, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@AnatoleLucet
Copy link
Collaborator

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

@AnatoleLucet AnatoleLucet added the bug Something isn't working label Feb 28, 2020
@AnatoleLucet AnatoleLucet changed the title Glob in file Glob stays in the tree's root path Feb 28, 2020
@sQVe
Copy link
Collaborator

sQVe commented Feb 29, 2020

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.

@AnatoleLucet
Copy link
Collaborator Author

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

@benawad
Copy link
Owner

benawad commented Feb 29, 2020

The alternative would be to show the shared parent

@sQVe
Copy link
Collaborator

sQVe commented Feb 29, 2020

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

@sQVe
Copy link
Collaborator

sQVe commented Feb 29, 2020

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.

@AnatoleLucet
Copy link
Collaborator Author

AnatoleLucet commented Feb 29, 2020

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?

@benawad
Copy link
Owner

benawad commented Feb 29, 2020

I like it

@benawad benawad reopened this Feb 29, 2020
sQVe added a commit that referenced this issue Mar 11, 2020
fix: Glob stays in the tree's root path - #88
@SimonJang
Copy link
Contributor

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?

@AnatoleLucet AnatoleLucet added enhancement New feature or request and removed bug Something isn't working labels Mar 11, 2020
@AnatoleLucet
Copy link
Collaborator Author

@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.

github-actions bot pushed a commit that referenced this issue Mar 26, 2020
# [0.5.0](v0.4.0...v0.5.0) (2020-03-26)

### Bug Fixes

* Glob stays in the tree's root path - [#88](#88) ([3795d40](3795d40))

### Features

* **debugger:** add debugger ([10d6a8b](10d6a8b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants