ignorefile-merge
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Package logo

Build Status npm Standard Shared Config

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:

Package Sidebar

Install

npm i ignorefile-merge

Weekly Downloads

3

Version

1.1.2

License

MIT

Unpacked Size

14.7 kB

Total Files

10

Last publish

Collaborators

  • keindev