You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🤞
Build | Passing
Anix
anikethsaha
🤞
Build | Passing
❤️ Open Source | works mainly with javascript | always bet on plugins
one realization from working on Netlify's CLI is that the CLI framework we used, oclif, didn't provide a great user experience out of the box.
Emphasis on great: it does a lot of nice things, like offering flag and argument parsing, help documentation, and pluggability. That's good for the CLI developer. But what about the CLI user?
Idiomatic oclif code often checks for required preconditions, and if it doesn't exist, it prints a warning and then process.exit(1).
Decent code prints a helpful warning telling the user what they got wrong. It is informative.
Better code offers a prompt, creates a file, or something similar to solve the precondition before proceeding. (possibly recursively). It is intent-based.
Great code remembers past inputs to prompts and uses that to offer useful defaults. It is adaptive.