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

feat(default-path): change the default path to project's root #131

Merged
merged 1 commit into from
Mar 9, 2025

Conversation

julio-cavallari
Copy link
Contributor

What:

  • Bug Fix
  • New Feature

Description:

Currently, the library uses the app or src folders as the default path from the root path

However, in Laravel projects, for example, there are many PHP files that are outside the app folder, such as migrations, seeders, factories, configurations file, the bootstrap folder, etc. This way, the user is forced to always use the path option, overriding the default path

This PR changes the default path to the project root directly, and if the user wants a specific path, then he uses the --path option to force the library to check that path.

PS: Since peck now checks all project files, I needed to add some words to the base stub that made sense to me to be there, and add tests path to ignore on peck.json

Related:

#130

Currently, the library uses the app or src folders as the default path from the root path

However, in Laravel projects, for example, there are many PHP files that are outside the app folder, such as migrations, seeders, factories, configurations file, the bootstrap folder, etc. This way, the user is forced to always use the path option, overriding the default path

This commit changes the default path to the project root directly
@c0nst4ntin c0nst4ntin linked an issue Feb 22, 2025 that may be closed by this pull request
Copy link
Collaborator

@c0nst4ntin c0nst4ntin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@julio-cavallari I think this is a great pull request. Thanks a lot for taking this from our discussion to this feature.

It would need some changes to the documentation, and probably also some further things added to the base stub (eg. editorconfig etc.). But those are things the community and I can add after we get this merged!

I will try to get @nunomaduro to take a look at this.

@c0nst4ntin
Copy link
Collaborator

@julio-cavallari I will merge this now. However before I tag the next version, I will try this in one or two of my larger projects to see what other words we might need to whitelist by default!

Feel free to also experiment with this

@c0nst4ntin c0nst4ntin merged commit 85bd6ff into peckphp:main Mar 9, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Idea: search for misspellings in file and folder names
2 participants