🚀 Socket Launch Week 🚀 Day 2: Introducing Repository Labels and Security Policies.Learn More
Socket
Sign inDemoInstall
Socket

@diez/cli-core

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@diez/cli-core

APIs for the Diez command line interface.

10.6.0
latest
Source
npm
Version published
Weekly downloads
618
-17.27%
Maintainers
3
Weekly downloads
 
Created
Source

@diez/cli-core

This package provides the core functionality of the extensible Diez command line interface.

Diez configurations, which can be specified either in package.json using the special "diez" key or in a dedicated .diezrc file, can extend the command line functionality in various ways, including registering compiler targets and providing entire new commands.

A CliCommandProvider can be implemented in a Diez package like this:

// src/commands/command.ts
import {CliCommandProvider} from '@diez/cli-core';

const provider: CliCommandProvider = {
  loadAction: () => action,
  name: 'command',
  description: 'Command description',
  options: [
    {
      shortName: 'o',
      longName: 'option',
      valueName: 'optionValue',
      description: 'Some option.',
    },
  ],
};

export = provider;

A custom command provider can be registered in package-name/package.json:

{
  "name": "package-name",
  ...,
  "diez": {
    "providers": {
      "commands": ["./lib/commands/command"]
    }
  }
}

or in package-name/.diezrc:

{
  "providers": {
    "commands": ["./lib/commands/command"]
  }
}

The resulting command can be invoked with: diez command --option [-o] <optionValue>.

FAQs

Package last updated on 20 May 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