gitignore-to-dockerignore

Generate an equivalent `.dockerignore` file from an existing `.gitignore` file.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gitignore-to-dockerignore
2.0.0a year ago4 years agoMinified + gzip package size for gitignore-to-dockerignore in KB

Readme

Gitignore → Dockerignore
Generate an equivalent .dockerignore file from an existing .gitignore file.

Installation

npm install --save gitignore-to-dockerignore

Usage

API

import gitignoreToDockerignore from 'gitignore-to-dockerignore'

const input = `
/node_modules/
*.log
`

console.log(gitignoreToDockerignore(input))
// .git/
// node_modules/
// **/*.log

CLI

# Write a .dockerignore file from .gitignore
gitignore-to-dockerignore