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

cc-terminal

v0.0.9-beta

Published

AngularJs Web based terminal module

Downloads

100

Readme

CcTerminalApp

This project is to create a web based terminal.

Try to enter help or 10+10 or even alert("Hello World") :P

How to Install?

Step 1 (Install Library):

# Please run following command in your terminal, before running this, make sure you already have installed Node, npm and angular cli.

npm install cc-terminal

Step 2 (To Get the assets from cc-terminal library to your project):

  1. Open angular.json
  2. Copy/Paste follows config into your architect > build > options > assets:
{
  "glob": "**/*",
  "input": "./node_modules/cc-terminal/lib/assets/",
  "output": "./assets"
}

Example: 

"assets": [
  // ... Other assets like "src/favicon.ico", "src/assets",
  {
    "glob": "**/*",
    "input": "./node_modules/cc-terminal/lib/assets/",
    "output": "./assets"
  }
]

How to Use?

Simple Example to use existing functionality


// Step 1. In your app.module.ts, first you need to import cc-module and then, you need to add it in imports, please see as below:

... // Other imports Here

import { CcTerminalModule } from 'cc-terminal';

@NgModule({
  declarations: [
    ... // Your other declarations
  ],
  imports: [
    ... // Your other imports
    CcTerminalModule
  ],
  providers: [
    ... // Your other providers
  ],
  bootstrap: [
    ... // Your bootstrap component
  ]
})
<!-- Step 2. To use this in you components, you need to just a tag use as follows: -->

<!-- In your any component html file or template style, add follows line, in my case its app.component.html -->

<cc-terminal ></cc-terminal>

Customize Styling Example

// Step 1: Add style in your application component

// ... Other imports

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  // ... other declaration
  _styles: any; // declaration of a property which will assign to ccStyle in template
  constructor() {
    // custom styling definition
    this._styles = {
      section: {
        color: 'lightgreen', background: 'black' // To Modify Default Width and Height, Add in Section
      },
      viewport: {
        color: 'yellow', background: 'black'
      },
      input: {
        color: 'red', background: 'black'
      },
      cursor: {
        color: 'green', background: 'black'
      }
    };
  }
}

<!-- Step 2: Add ccStyle property with the defined model in your component -->
<cc-terminal [ccStyle]="_styles"></cc-terminal>
Note: There are more to come, please have patience! :)

TODO:

  • [x] Add classes to re design the terminal configuration from External Module. [In Progress]
  • [x] Add Terminal Configuration from External Module.
  • [x] Add Feasibility to create a custom commands.
  • [x] Add centralize command registry for simplicity. [High Priority]
  • [ ] Try to add support for complex commands
  • [ ] Add Test Cases
  • [ ] Add Support For ASCII Characters on Terminal Output
  • [ ] Add Support For Images on Terminal Output
  • [ ] Add Support For Videos on Terminal Output
  • [ ] Add Support For Custom Design (Graphic or Canvas) on Terminal Output