Registry / yeoman-character

yeoman-character

JSON →
library2.0.0jsnpmunverified

The `yeoman-character` package provides a customizable, multi-line ASCII art representation of the Yeoman mascot for command-line interfaces. The current stable version is 2.0.0, which introduced significant breaking changes by moving to pure ES Modules and requiring Node.js 18. As a focused utility package for a specific visual element, its release cadence is typically slow, primarily addressing compatibility updates rather than frequent feature additions. Its key differentiator is its singular purpose: delivering the iconic Yeoman character simply and effectively to any Node.js CLI, making it a staple for branding tools within the Yeoman ecosystem or for adding a distinctive visual flair to console output.

npm install yeoman-character
INSTALL
IMPORT
SIG · YEOMAN-CHARACTER
Y
yeoman-character
javascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

yeomanCharacter
import yeomanCharacter from 'yeoman-character';
const yeomanCharacter = require('yeoman-character');
This package is pure ES Modules (ESM) since v2.0.0. CommonJS `require()` is no longer supported directly. For CJS environments, dynamic `import()` is required.

Demonstrates how to import and log the Yeoman character string using ES Modules, including setup instructions for ESM, and mentions the global CLI usage.

// To run this example: // 1. Ensure your Node.js version is 18 or higher. // 2. Save this code as `index.mjs` (note the `.mjs` extension for ESM). // 3. In your project directory, run: `npm install yeoman-character` // 4. Then execute from your terminal: `node index.mjs` import yeomanCharacter from 'yeoman-character'; console.log("-----------------------------------------"); console.log(" Displaying the Yeoman Character:"); console.log("-----------------------------------------"); // The `yeomanCharacter` export is a simple multiline string containing // the ASCII art representation of the Yeoman mascot. While the character // itself does not contain ANSI color codes by default in this package // version, it is commonly used with terminal coloring libraries // like 'chalk' or 'picocolors' for visual effect in CLIs. console.log(yeomanCharacter); console.log("\nThis character can also be displayed directly via its CLI:"); console.log("To install globally: `npm install --global yeoman-character`"); console.log("Then run from any terminal: `yeoman-character`"); console.log("-----------------------------------------");
Debug
Known issues
breakingThis package is now pure ES Modules (ESM) and no longer supports CommonJS `require()` directly.
fix
Migrate your codebase to use ES Modules (e.g., `"type": "module"` in `package.json` or `.mjs` file extension). If you must use it in a CJS environment, consider dynamic `import()` (e.g., `import('yeoman-character').then(mod => console.log(mod.default))`).
affects: >=2.0.0
breakingThe minimum required Node.js version has been increased to 18.
fix
Upgrade your Node.js environment to version 18 or newer to ensure compatibility and prevent runtime errors.
affects: >=2.0.0
gotchaThe exported `yeomanCharacter` string does not contain ANSI color codes by default in v2.x, despite screenshots often showing a colored character.
fix
To display the character with colors, you will need to apply a terminal coloring library (e.g., `chalk`, `picocolors`) to the string yourself, such as `console.log(chalk.blue(yeomanCharacter))`.
affects: >=2.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Attempting to use `require('yeoman-character')` in a CommonJS file when the package is pure ES Modules.
fix
Change `require('yeoman-character')` to `import yeomanCharacter from 'yeoman-character';` and ensure your project uses ES Modules (e.g., by setting `"type": "module"` in `package.json` or using `.mjs` file extensions). For CJS compatibility, use `import('yeoman-character').then(mod => console.log(mod.default))`.
SyntaxError: Cannot use import statement outside a module
Attempting to use ES `import` syntax (e.g., `import yeomanCharacter from 'yeoman-character';`) in a file that is being interpreted as CommonJS.
fix
Ensure the file using `import` is treated as an ES Module by either renaming it to `.mjs` or by adding `"type": "module"` to your project's `package.json`.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
yeoman-character — npm install yeoman-character · libregistry