It would be great to have an option to save the ASCII output to a file, e.g.:
--output, -o <file>
3 karma · joined September 15, 2022
It would be great to have an option to save the ASCII output to a file, e.g.:
--output, -o <file>
There are already big "do-it-all" CLI libraries like "yargs-parser" (85 kB), "meow" (419 kB), "minimist" (55kB), etc.
Flaget is intentionally minimal — small size is the killer feature. I want to keep it as compact as possible without bloating it with rarely needed functionality.
The e18e community focuses on optimising npm packages by replacing heavy dependencies with smaller alternatives.
Still, some of your ideas are very useful, and I may add:
- Named positional
- Nested options
But others are outside the scope of a small library like this.
This bundler plugin simplify the Webpack config.
The html-bundler-webpack-plugin allows to use a HTML template as an entry point. In a HTML template can be referenced any source files of styles, scripts, images, fonts, etc. The plugin detects all source files referenced in a HTML template and extracts processed assets to the output directory.
View in a browser how it works: https://stackblitz.com/edit/stackblitz-starters-78r926?file=...
Why yet one lib? - up to x3.5 faster than chalk - dist code is 3 KB only - supports both ESM and CommonJS - named import of colors - chained syntax: ansis.red.bold('text') - nested template strings: red`A ${cyan`B`} A` - ANSI 256 colors and Truecolor (RGB, HEX) - CLI variables NO_COLOR FORCE_COLOR and flags --no-color --color - strip ANSI codes - TypeScript friendly - zero issues
See please the comparison and benchmarks of most popular libraries: - colors.js - colorette - picocolors - cli-color - colors-cli - ansi-colors - kleur - chalk - ansis
Comparison: https://github.com/webdiscus/ansis#comparison-of-most-popula...
Benchmark: https://github.com/webdiscus/ansis#benchmark