Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kayako/kit

Package Overview
Dependencies
Maintainers
6
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kayako/kit

Kayako command line tool for creating custom apps

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
6
Weekly downloads
 
Created
Source

KIT CLI

The KIT Cli is the command line tool to create, manage and publish custom apps with Kayako.

Requirements

This project makes use of adonis ace and requires atleast Node.js version 8.0 or greater since this project makes use of async/await.

Setup

Follow below defined steps to setup this project.

  1. Clone the repo from Github.
  2. Run npm install to install all required dependencies.
  3. Run node index.js to make sure all existing commands runs fine.

Creating new command

All commands lives inside src/Commands directory and automatically get's registered with ace.

Also there is an example command saved inside example/Command.js file as a reference.

Ace reference

All ace commands are ES6 classes with couple of mandatory static properties and handle method.

'use strict'

const { Command } = require('@adonisjs/ace')

class MyCommand extends Command {
  static get signature () {
    return 'command:name'
  }

  static get description () {
    return 'Command description'
  }

  async handle (args, options) {
  }
}

module.exports = MyCommand



Signature

Signature defines the command name and it's requirements. All required/optional arguments and flags are defined within the signature.

For example:

Required argument
static get signature () {
  return 'new { projectPath }'
}
Optional argument
static get signature () {
  return 'new { projectPath? }'
}
Argument Description
static get signature () {
  return 'new { projectPath : Path to directory where to create the project }'
}
Flags

Flags starts with --.

static get signature () {
  return `
    new
    { projectPath }
    { --skip-install : Do not install dependencies }
  `
}



Description

The command description shown within help output.

Handle method

The handle method is called when the command is executed. It will receive all the arguments and flags as parameters.

await handle (args, options) {
  console.log(args.projectName)
  console.log(options.skipInstall)
}

Keywords

FAQs

Package last updated on 24 Nov 2017

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc