-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #231 from oclif/mdonnalley/ux-docs
feat: ux related docs
- Loading branch information
Showing
7 changed files
with
51 additions
and
328 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: User Experience | ||
--- | ||
|
||
oclif's philosophy is that developers should free to design any user experience that they want for their users. In other words, we try really hard to not make any UX decisions for you. | ||
|
||
So many times we utilize [hooks](./hooks.md) whenever a user experience is required (e.g. the provided command isn't found). That way you can design the exact experience you want your users to have. In the case of error handling, you're [able to override](./error_handling.md) oclif's default behavior. | ||
|
||
But to make it easy for you, `@oclif/core` exports a [`ux` module](https://github.com/oclif/core/blob/main/src/cli-ux/README.md) that offers several tools you can use to implement your desired user experience. | ||
|
||
However, due to time constraints we are not able to support this module as well as we would like. For that reason, we **strongly** recommend that you find npm libraries that specialize in the UX components you want to use. Here's a brief list of some of the libraries we like: | ||
|
||
- For prompts: [inquirer](https://www.npmjs.com/package/inquirer) | ||
- For spinners: [ora](https://www.npmjs.com/package/ora) | ||
- For progress bars: [cli-progress](https://www.npmjs.com/package/cli-progress) | ||
- For hyperlinks: [hyperlink](https://www.npmjs.com/package/hyperlink) | ||
- For tables: [tty-table](https://www.npmjs.com/package/tty-table), [cliui](https://www.npmjs.com/package/cliui) | ||
- For trees: [object-treeify](https://www.npmjs.com/package/object-treeify) | ||
- For colored JSON: [color-json](https://www.npmjs.com/package/color-json) | ||
- For notifications: [node-notifier](https://www.npmjs.com/package/node-notifier) | ||
- For rendering react components: [ink](https://www.npmjs.com/package/ink) |
Oops, something went wrong.