Skip to content

Commit

Permalink
Tweaks documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Mar 26, 2024
1 parent 1d7983e commit 77acd0f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
22 changes: 11 additions & 11 deletions docs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ export const config = {

featured: [{
title: `Type Safe`,
description: `Clipanion provides type inference for the options you declare: no duplicated types to write and keep in sync.`,
description: `Everything, including style properties and event handlers, is strongly typed.`,
}, {
title: `Tooling Integration`,
description: `Because it uses standard ES6 classes, tools like ESLint can easily lint your options to detect the unused ones.`,
title: `No Dependencies`,
description: `The React renderer is entirely optional, and the core library is framework agnostic.`,
}, {
title: `Feature Complete`,
description: `Clipanion supports subcommands, arrays, counters, execution contexts, error handling, option proxying, and much more.`,
title: `React Integration`,
description: `Terminosaurus lets you use React to author your GUIs, simplifying state management.`,
}, {
title: `Soundness`,
description: `Clipanion unifies your commands into a proper state machine. It gives little room for bugs, and unlocks command overloads.`,
title: `CSS Support`,
description: `Terminosaurus supports many of the CSS properties you're used to - text-decoration, background-color, ...`,
}, {
title: `Tree Shaking`,
description: `The core is implemented using a functional approach, letting most bundlers only keep what you actually use.`,
title: `Fast Updates`,
description: `Terminosaurus tries to only redraw components that changed, even if you don't use memoization patterns.`,
}, {
title: `Battle Tested`,
description: `Clipanion is used to power Yarn - likely one of the most complex CLI used everyday by the JavaScript community.`,
title: `Advanced Layouts`,
description: `Terminosaurus supports flexbox layouts, but also relative and absolute positioning, overflow, scrolling, and more.`,
}],
};
33 changes: 17 additions & 16 deletions docs/overview/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,20 @@ render(
);
```

## Comparison to other libraries

### Blessed

Blessed is an old, popular but unmaintained terminal GUI library for Node.js. Being so old, its API are fairly simple but lack flexibility, power, and performances. Terminosaurus is more modern and provides a powerful React renderer that allows you to create complex terminal applications with ease.

Blessed also doesn't integrate well with complex layouts, such as flexbox, and doesn't provide a way to easily create reusable components.

### Ink

Terminosaurus is similar to [Ink](https://github.com/vadimdemedes/ink), but is more powerful. While Ink leverages the same layout library as Terminosaurus and also provides an integrated React renderer, it lacks a couple of important features:

- It cannot run without React, making it difficult to use in very simple scripts.
- It doesn't support scrolling ([#222](https://github.com/vadimdemedes/ink/issues/222)).
- It doesn't support advanced text layout (`white-space`, `text-align`, etc).
- Text nodes must be wrapped within `<Text>`, which can be cumbersome.
## Comparison table

| Feature | Terminosaurus | Ink | Blessed |
| --- | --- | --- | --- |
| **Framework-agnostic API** ||||
| **React renderer** ||| ⚠️ ¹ |
| **Flexbox layout** ||||
| **Relative / absolute positioning** ||||
| **Focus management** ||||
| **Scrolling** ||||
| **Text alignment** ||||
| **Text wrapping** ||||
| **CSS properties** || ✅ ² ||

¹ Blessed kinda supports React 17 thanks to [react-blessed](https://github.com/yomguithereal/react-blessed), but it's unmaintained.

² Ink also supports some CSS properties, but not as much as Terminosaurus.

0 comments on commit 77acd0f

Please sign in to comment.