git-file
read file and directory data from a git repo as streams
example
stream a directory listing
var git = ;var joinStream = ;var commit = processargv2;var dir = processargv3;git;
stream a file
var git = ;var joinStream = ;var commit = processargv2;var file = processargv3;git;
methods
var git =
git.list(ref, dir, opts)
List the contents of a directory dir
at the
revision
ref
.
Returns a stream with a 'data'
event for each file where directories have a
trailing '/'
.
git.read(ref, file, opts)
Return a stream with the contents of file
at the
revision
ref
.
git(ref, opts)
Return an object with list
and read
bound to the ref
and/or opts
provided.
install
With npm do:
npm install git-file