GithubHelp home page GithubHelp logo

sindresorhus / ink-big-text Goto Github PK

View Code? Open in Web Editor NEW
113.0 3.0 8.0 34 KB

Awesome text component for Ink

License: MIT License

TypeScript 100.00%
ink-component ink react jsx cli figlet nodejs npm-package

ink-big-text's Introduction

ink-big-text

Awesome text component for Ink

Install

npm install ink-big-text

Usage

import React from 'react';
import {render} from 'ink';
import Gradient from 'ink-gradient';
import BigText from 'ink-big-text';

render(
	<Gradient name="rainbow">
		<BigText text="unicorns"/>
	</Gradient>
);

API

<BigText/>

Props except for text are passed as options to cfonts. The only difference is that the background option is named backgroundColor here. See the prop types in index.tsx for more.

Related

ink-big-text's People

Contributors

asmockler avatar cometkim avatar jrr avatar richienb avatar shahzeb1 avatar sindresorhus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ink-big-text's Issues

ESM Compatibility

When I attempted to upgrade my project to Ink 4 / ESM, I got the following error related to ink-big-text:

/Users/jrr/repos/inkle/node_modules/ink-big-text/dist.js:5
var _ink = require("ink");
           ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/jrr/repos/inkle/node_modules/ink/build/index.js from /Users/jrr/repos/inkle/node_modules/ink-big-text/dist.js not supported.
Instead change the require of index.js in /Users/jrr/repos/inkle/node_modules/ink-big-text/dist.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/jrr/repos/inkle/node_modules/ink-big-text/dist.js:5:12) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v18.15.0

I don't pretend to understand ESM, but I suspect ink-big-text will need some changes to remain compatible with Ink 4.

For what it's worth, here's my tsconfig:

{
  "compilerOptions": {
    "target": "ES2020",
    "strict": true,
    "noEmitOnError": true,
    "forceConsistentCasingInFileNames": true,
    "skipLibCheck": true,
    "module": "node16",
    "moduleResolution": "nodenext",
    "jsx": "react",
    "esModuleInterop": true,
    "outDir": "dist"
  },
  "include": ["src"]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.