Conversation
…urrent directory like django-admin startproject
…ectory and improve --no-project-dir behavior
…flag to scaffold in current directory like django-admin startproject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enhances the
fletx newcommand to behave similarly todjango-admin startprojectby allowing users to scaffold a project directly in the current directory without creating an extra subdirectory, while preserving the existing behavior when a subdirectory is desired.Changes
directoryargument optional (defaults to current directory).directoryis., the command treats it as a request to scaffold in the current directory (equivalent to using--no-project-dir).--no-project-dirflag to explicitly generate project files in the target directory instead of creating a subdirectory named after the project.Behavior
Default (subdirectory creation):
fletx new my_project # → creates ./my_project/ with all template files insideSpecified directory (subdirectory inside that path):
fletx new my_project /path/to/workspace/ # → creates /path/to/workspace/my_project/ with all template files insideScaffold in current directory (using dot):
Explicit flag (same as dot):
fletx new my_project --no-project-dir /path/to/workspace/ # → generates all template files directly in /path/to/workspace/ (no subdirectory)Impact
All tests pass, and the changes have been verified manually for the three main use cases.
Closes #170