Socket
Book a DemoInstallSign in
Socket

clivate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clivate

Flexible Node.js CLI Tooling

latest
npmnpm
Version
1.0.0-alpha.2
Version published
Maintainers
1
Created
Source

CLIvate (WARNING - this project is not yet ready for production)

CLIvate - a typescript CLI tool generator

Installation

yarn add --dev clivate

Usage

Custom project commands

  • create config ts/json
  • specify search pattern
  • how to call (yarn clivate (command))

Package with bin

  • import clivate
  • register commands
  • build and publish

Adding package extensions

  • requires ts-node, don't prebuild
  • parse a config

Writing commands

import { CommandDescription, CommandName, CommandPrompts } from "clivate";

@CommandName("test")
@CommandDescription("a test command")
@CommandPrompts([{
  name:'prompt1',
  type:'confirm'
}])
class TestCommand extends Command {
  handler() {
    console.log("running test");
    run = true;
  }
  • command name
  • description
  • prompts
  • command args
  • handler
  • conditional prompts
  • calling another command
  • Non-root internal commands
  • Loading asynchronous prompt data.

FAQs

Package last updated on 27 Aug 2020

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.