ignorefile-merge
v1.1.2
Published
Merge .ignore files, including comments
Downloads
165
Maintainers
Readme
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: