1.1.2 • Published 3 months ago

ignorefile-merge v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Merge .ignore files, including comments

Install

npm install ignorefile-merge

Usage

import { merge } from 'ignorefile-merge';

const left = `
# dotenv
.env.development.local
.env.production.local

# cache
.cache
`;

const right = `
# dotenv
.env.development.local
.env.production.local
.env.test.local

# Output of 'npm pack'
*.tgz

# cache
.cache
`;

/*
Result "ignore" content will be:
# dotenv
.env.development.local
.env.production.local

# cache
.cache

# Output of 'npm pack'
*.tgz

# cache
.cache

# !ignorefile-merge block-open
# ---------------------------------------------------------------
# This block generated automatically
# @see https://www.npmjs.com/package/ignorefile-merge
# ---------------------------------------------------------------

# dotenv
# .env.development.local
# .env.production.local
.env.test.local

# Output of 'npm pack'
*.tgz

# cache
# .cache

# !ignorefile-merge block-close

*/
const result = merge(left, right);

Examples

standard-shared-config - Easy way to create and share your boilerplate configs. One shared config to rule them all:loop::package:

1.1.2

3 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago