Coder Social home page Coder Social logo

dominhhai / gitignore Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 12 KB

Create `.gitignore` file from any source

Home Page: https://www.npmjs.com/package/giig

License: MIT License

JavaScript 100.00%
gitignore gitignore-files gitignore-templates gitignore-generator

gitignore's Introduction

giig

Create .gitignore file from any source such as Github or your local directory.

Installation

$ npm i -g giig

Usage

1. Fetch template

Fetch tpl .gitignore template from registered source:

$ giig fetch [options] <tpl>

Options:

  • -s, --source [source]: source name (default: github)
  • -d, --dest [dest]: project root (default: .gitignore)
  • -h, --help: output usage information

The source must be registered before using. Except the github is always available. See here for more info.

E.x: Download the Node template from github

$ giig fetch Node

2. List templates

List all available .gitignore templates from src source (default: github):

$ giig list [src]

E.x: Show all templates from github

$ giig list github

3. List template sources

List all available sources:

$ giig src-list

4. Add/Update source information

Add/Update key source info with list and file:

$ giig src-add <key> <list> [file]

Where:

  • list: URL or Directory which contain list of templates. If list is a url, it has to return a json file as Github Contents API.
  • file: The root path contains template file. Default is the value of list.

E.x 1: Add template source from ~/gitignore_tpl folder with name igiig

$ giig src-add igiig "~/gitignore_tpl"

E.x 2: Add template source from https://github.com/dvcs/gitignore with name dvcs

$ giig src-add dvcs "https://api.github.com/repos/dvcs/gitignore/contents/templates" "https://raw.githubusercontent.com/dvcs/gitignore/master/templates"

5. Show source information

Show key source info:

$ giig src-show <key>

E.x: Show dvcs source info

$ giig src-show dvcs

6. Remove source information

Remove key source from source list:

$ giig src-del <key>

E.x: Remove dvcs source

$ giig src-del dvcs

gitignore's People

Contributors

dominhhai avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.