Skip to main content
Deno 2 is finally here 🎉️
Learn more

g2d Test

Transform .gitignore into .dockerignore.

.gitignore .dockerignore
!/ !
! !**/
/ -
- **/

Usage

g2d will detect the nearest .gitignore by default.

# std output
g2d

# write into .dockerignore
g2d -o .

# if foo is a directory
# .dockerignore would be export into foo/.dockerignore
g2d -o foo
cat foo/.gitignore

# if foo is a file
# .dockerignore would be export into foo
g2d -o foo
cat foo

# more
g2d -h

Dev

deno run --importmap=import_map.json --unstable --allow-read --allow-write bin.ts

Test

deno test --importmap=import_map.json --unstable .