New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gitignore-generate

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitignore-generate

Automatically fetch gitignore files for any project type from github into your new project

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

gitignore

Automatically fetch github's excellent .gitignore files for any of your new projects

Forked from https://github.com/msfeldstein/gitignore

Here is the list of available types

Use as a global utility

Install

npm install gitignore-generate -g

Note: If NPX (NPM's official package runner) is available in your environment you can use it to avoid a global install: ex. $ npx gitignore node is equivalent to npm i -g gitignore && gitignore node but avoids the global install step

Usage

To list out all of the available types:

gitignore -types

To create a .gitignore for rails:

gitignore rails

That's it.

Use programmatically as a module

Install

npm install gitignore

and require

var gi = require(`gitignore`);

API

.getTypes(callback)

Gets the types via https request to GitHub.

callback(err, types)

If an error occurred, or the request failed, an Error object is passed as the first parameter. If the types were successfully requested, an array of types is passed as the second parameter with null as the first.

.writeFile(options, callback)

Gets the .gitignore file from GitHub of the specified options.type and stores it in the writable stream at options.file or options.writable.

options

.type (string) - The type associated with the .gitignore file to be fetched .file, .writable (writable stream) - A writable stream (a file, sdtout, etc) that the results should be written to

callback(err)

If an error occurred or the request did not go through, an error obect is passed as the first parameter. If the request was successful, the first parameter is null or undefined.

FAQs

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