🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@armit/common

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@armit/common

A fast, generic utils for working with command, git, file, package, terminal, logger and etc based on armitjs.

latest
Source
npmnpm
Version
0.0.11
Version published
Weekly downloads
29
-38.3%
Maintainers
1
Weekly downloads
 
Created
Source

@armit/common

A fast, generic utils for working with command, git, file, package, terminal, logger and etc based on armitjs.

Module/Programmatic Usage

  • yarn add @armit/common

Add this package to package dependencies linked to your app, just import them like regular packages:

import { AbstractHandler } from "@armit/common";

type TestCmdArgs = CommandArgv<{
  test: number;
}>;

class CmdTestHandle extends AbstractHandler<TestCmdArgs> {
  get name(): string {
    return `test`;
  }
  handle(): void | Promise<void> {
    console.log("this is test command handle");
    this.logger.debug("this is debug message for test command");
  }
}

export const cmdTest = createCommand(
  "test",
  {
    command: "test",
    describe: "Display armit project details.",
    builder: (yargs) => {
      return yargs.example(`$0 cmd test `, "cli testing").option("test", {
        type: "number",
        alias: "t",
        default: true,
        describe: `cli option test describe`,
      });
    },
  },
  CmdTestHandle
);

FAQs

Package last updated on 29 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts