From 77acd0f3ffb0179666ff88b8b5652b7f5a0e20d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Tue, 26 Mar 2024 21:51:48 +0100 Subject: [PATCH] Tweaks documentation --- docs/config.ts | 22 +++++++++++----------- docs/overview/page.mdx | 33 +++++++++++++++++---------------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/docs/config.ts b/docs/config.ts index b98b39a..ce03abe 100644 --- a/docs/config.ts +++ b/docs/config.ts @@ -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.`, }], }; diff --git a/docs/overview/page.mdx b/docs/overview/page.mdx index 8aff962..9498184 100644 --- a/docs/overview/page.mdx +++ b/docs/overview/page.mdx @@ -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 ``, 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.