Skip to content

BrunoQuaresma/git-read

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-read

Read files from git

Usage

const GitReader = require('git-read')
const gitReader = new GitReader('https://github.com/user/repo.git')

gitReader.load().then(() => {
  console.log(gitReader.read('config/user.json'))
})

// output:
// { "name": "Foo", "last_name": "Bar" }
API What it does
constructor(repoPath) Builds a consumer for the specified repository
read(filePath) Returns the content of the repo file encoded by utf8

About

A content consumer for git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published