Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 496 Bytes

readme.md

File metadata and controls

34 lines (24 loc) · 496 Bytes

Gitignore → Dockerignore

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

Installation

npm install --save gitignore-to-dockerignore

Usage

API

const gitignoreToDockerignore = require('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