Socket
Book a DemoInstallSign in
Socket

post-command-hook-install-packages-plugin

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

post-command-hook-install-packages-plugin

Provides install packages functionality for post-command-hook

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

post-command-hook-install-packages-plugin NPM version

Install packages plugin for post-command-hook.

Install packages plugin for post-command-hook gives you a possibility to install specified packages after some command have been executed using the install-packages library.

Installation

$ npm install --save post-command-hook post-command-hook-install-packages-plugin

Usage

const PostCommandHook = require("post-command-hook");
const InstallPackagesPlugin = require("post-command-hook-install-packages-plugin");

const postCommandHook = new PostCommandHook({
  command: "npx",
  args: ["create-react-app", "myapp"],
});
postCommandHook.use(new InstallPackagesPlugin(["redux", "react-redux"]));

(async () => {
  await postCommandHook.run();
})();

API

new InstallPackagesPlugin(packages)

Constructs an instance of InstallPackagesPlugin class providing packages - an array of packages to be installed.

packages

Type: array

An array of packages to be installed.

installOptions

Type: object

Install options to be passed to install-packages module. See api section in its README

pluginOptions

Type: object

Plugin options

silent

Type: boolean

If there was an error while installing packages handle it just log it to console without throwing an error

name

Type: string

Plugin name to be used when logging error messages, if not specified a random uid will be used as a plugin name

License

MIT © Rushan Alyautdinov

Keywords

post-command-hook

FAQs

Package last updated on 09 May 2023

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