Fix #200: Store project configuration in local directory #201
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.
Fix: Store project configuration in local directory
This PR fixes issue #200 by ensuring that project-specific configuration is stored in the local directory (
.mycoder/config.json
) rather than using the global configuration file for both global and project settings.Changes
getProjectSettingsDir()
insettings.ts
to ensure the project directory is created when neededgetProjectConfigFile()
inconfig.ts
to ensure the project directory exists before returning the pathconfig list
command to display both global and project config file paths to the user, making it clear where settings are storedTesting
mycoder config list
to see both global and project config file pathsmycoder config set <key> <value>
and verify it's stored in the local.mycoder/config.json
filemycoder config set --global <key> <value>
and verify it's stored in the global config fileThis change improves the user experience by making the configuration system work more like npm and other tools where project settings are stored in the project directory.
Fixes #200