Socket
Book a DemoInstallSign in
Socket

post-command-hook-add-gitignore-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

post-command-hook-add-gitignore-plugin

Automatically adds .gitignore file plugin for post-command-hook

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

post-command-hook-add-gitignore-plugin NPM version

Add Gitignore plugin for post-command-hook.

Add Gitignore plugin for post-command-hook automatically creates .gitignore file (with predefined items as a content by default) after some command have been executed.

Installation

$ npm install --save-dev post-command-hook post-command-hook-add-gitignore-plugin

Usage

const PostCommandHook = require("post-command-hook");
const AddGitignorePlugin = require("post-command-hook-add-gitignore-plugin");

const postCommandHook = new PostCommandHook({
  command: "echo",
  args: ["Setup"],
});
postCommandHook.use(new AddGitignorePlugin());

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

API

new AddGitignorePlugin()

Constructs an instance of AddGitignorePlugin class.

.addItem(item)

Adds specified item to include it to the .gitignore file.

item

Type: string

.addItems(items)

Adds specified items to the patterns so they are going to be included in the generated .gitignore file.

items

Type: array

Array of strings to be appended to the patterns.

.setItems(items)

Overrides patterns array with specified items.

items

Type: array

Array of strings to override patterns array with.

License

MIT © Rushan Alyautdinov

Keywords

post-command-hook

FAQs

Package last updated on 06 Jan 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