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

.dojorc validation #241

Closed
JamesLMilner opened this issue Jul 10, 2018 · 1 comment
Closed

.dojorc validation #241

JamesLMilner opened this issue Jul 10, 2018 · 1 comment

Comments

@JamesLMilner
Copy link
Contributor

Enhancement

Some CLI tools that rely on configs will do validation on those configs to ensure they are correct. For example Webpack does this:

screenshot_20180710_141137

I'm not entirely sure how this would be achieved, so I thought I'd open that up for discussion. Happy to look into implementing once there is consensus on the best approach.

Code

I would imagine the interface would be something like this:

dojo validate

or for example

dojo build

Throws an error if .dojorc doesn't match a specified schema

@mwistrand
Copy link
Contributor

One option would be a dedicated validate command alongside a validate method on the Command interface (which is how eject is handled). Each cli package would specify an optional validate method on the Command object it exports, and at the very least that would be executed with $ dojo validate. Additionally, the command-level validate could also be executed each time the command itself is invoked (e.g., $ dojo build would also validate the "build-app" config).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants