npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-termynal-new

v1.1.0

Published

Another react wrapper around termynal.js

Downloads

17

Readme

React-Termynal-New

react-termynal-new is another react wrapper around the css/javascript library termynal.js.

Installation

npm install react-termynal-new

Usage

import React from 'react';
import {App as Termynal, DataLine} from 'react-termynal-new';

const App = () => {
  return (
    <Termynal>
      <DataLine type="input">pip install spacy</DataLine>
      <DataLine type="progress"></DataLine>
      <DataLine>SUCCESS: spacy-2.0.18-cp36-cp36m-win_amd64.whl is in your current directory.</DataLine>
      <DataLine></DataLine>
      <DataLine type="input">python -m spacy download en</DataLine>
      <DataLine type="progress"></DataLine>
      <DataLine>Installed en_core_web_sm-2.0.0</DataLine>
      <DataLine></DataLine>
      <DataLine type="input">python</DataLine>
      <DataLine type="input" prompt=">>>">import spacy</DataLine>
      <DataLine type="input" prompt=">>>">nlp = spacy.load('en')</DataLine>
      <DataLine type="input" prompt=">>>">doc = nlp("Hello world!")</DataLine>
      <DataLine type="input" prompt=">>>">print([(w.text, w.pos_) for w in doc])</DataLine>
      <DataLine type="output">[('Hello', 'INTJ'), ('world', 'NOUN'), ('!', 'PUNCT')]</DataLine>
    </Termynal>
  );
};

export default App;

example

Props

App

| Prop | Type | Default | Description | |-----------------|----------------|------------|------------------------------------------------------| | id | string | termynal | The id of the terminal | | title | string | bash | The title of the terminal | | flex | boolean | false | Whether to make height of terminal flexible | | startDelay | number | 600 | The delay before the terminal starts typing | | typeDelay | number | 90 | The delay between each character typed in input line | | lineDelay | number | 1500 | The delay between each line | | progressLength | number | 40 | The length of the progress bar | | progressChar | string | | The character to use for the progress bar | | progressPercent | number | 100 | The percentage of the progress bar to fill | | cursor | string | | The character to use for the cursor | | children | ReactElement[] | [] | The lines to render in the terminal |

DataLine

| Prop | Type | Description | |-----------------|--------|------------------------------------------------------------------------------| | type | string | The type of the element. Can be 'input', 'progress', or '' as pure text line | | cursor | string | The character to use for the cursor | | value | string | The value of the element | | delay | number | The delay before the element is rendered | | typeDelay | number | The delay between each character typed in input line | | prompt | string | The prompt to use for input lines | | progressLength | number | The length of the progress bar | | progressChar | string | The character to use for the progress bar | | progressPercent | number | The percentage of the progress bar to fill |