-
Notifications
You must be signed in to change notification settings - Fork 12k
refactor(config): refactor the config object. #1809
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
Conversation
f38ac7a
to
6f82d23
Compare
b857c99
to
e93083b
Compare
config.set(rawArgs[0], rawArgs[1], commandOptions.force); | ||
const [jsonPath, rawValue] = rawArgs; | ||
const config = CliConfig.fromProject(); | ||
const type = config.typeOf(rawArgs[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use config.typeOf(jsonPath);
here since it's already destructured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
What is the |
Can you also add some information on the README about how to use |
Re empty file, contains stuff now. |
It's true that they are the same, but we have no documentation whatsoever for users to use them, so no one but us knows how to use this functionality. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This also will load
angular-cli.json
in the HOME directory as a fallback, supports more stuff from the JSON Schema (like default values) than the old one, and actually verify that what you inputs is the right thing.This will be its own NPM package at some point, as other people will probably be interested in having a JSON Schema loader that gives type safety and provides fallbacks and metadata.
Closes #1763