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

Remove .keep files with other files in the directory during init process #778

Open
matthewmcgarvey opened this issue Sep 17, 2022 · 5 comments

Comments

@matthewmcgarvey
Copy link
Member

The most annoying thing that I find myself wasting time on when I create a new project is deleting these pesky .keep files from directories. They're all over and almost none of them are necessary in a normally generated project. It shouldn't be too hard to find all .keep files and delete any with other files in the directory. It could be one of the last steps in the init command and it would save me like 5 minutes of time 🙏

@jwoertink
Copy link
Member

Aren't they needed because default git setups won't include empty directories? So you end up losing context. Or is that not a thing anymore?

Related: #741

@stephendolan
Copy link
Member

Yeah, I the idea is that you preserve the expected structure of a Lucky app using these .keep files, even if you remove all of the non-hidden files (like clearing our all actions).

I don't think we should do this by default, but like the idea of having it as an init flag like Rails does (I think it's --no-keep).

@matthewmcgarvey
Copy link
Member Author

Sorry, it was late and I didn't explain it well. I'm talking about .keep files that are in directories with other files or directories. Because of that, they are there for no reason. So what i'm recommending is leaving the .keep files that are there for a reason and remove the ones that aren't (which is the vast majority on a normal app).

@stephendolan
Copy link
Member

Is the reason for those that we might add a generator to the CLI that doesn't populate them, though?

@jwoertink
Copy link
Member

Yeah, I guess that makes sense. If we generate a .keep inside of the src/actions, that should go away since you'll never have an empty actions directory in Lucky. It almost seems like it's just mixins directories that would have it, right?

@jwoertink jwoertink added the hacktoberfest Valid Issue for Hacktoberfest label Oct 1, 2022
@jwoertink jwoertink removed the hacktoberfest Valid Issue for Hacktoberfest label Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants