gitignore-merge

0.1.0 • Public • Published

gitignore-merge

Merge multiple .gitignore files.

Sections defined with the same #@ Section name are merged.

Blocks within sections are identified by a leading comment are merged within sections.

Example

var merge = require('gitignore-merge');
merge(A, B, { sort: true });

File A:

#@ Platform Specific
.DS_Store

#@ Node
node_modules

#logs
*.log

# Build
build

File B:

#@ Platform Specific
Thumbs.db

#@ Node
# Coverage directory
coverage

#logs
.logs

Result:

#@ Node
node_modules

# Build
build

# Coverage directory
coverage

# logs
*.log
.logs

#@ Platform Specific
.DS_Store
Thumbs.db

/gitignore-merge/

    Package Sidebar

    Install

    npm i gitignore-merge

    Weekly Downloads

    0

    Version

    0.1.0

    License

    none

    Last publish

    Collaborators

    • nealgranger