npm.io
0.0.4 • Published 6 years ago

git-content

Licence
MIT
Version
0.0.4
Deps
2
Size
7 kB
Vulns
0
Weekly
0

git-content

get, create, update and delete action on files inside github repo.

Installation

npm i -g git-content

Usage

CLI
git-content help

git-content create --path="test3.json" --content="awesome content" --auth="XXXXXXXXXXX" --owner="niradler" --branch="master" --repo="config"

git-content get --path="test3.json" --auth="XXXXXXXXXXX" --owner="niradler" --branch="master" --repo="config"

git-content update --path="test3.json" --content="new awesome content" --auth="XXXXXXXXXXX" --owner="niradler" --branch="master" --repo="config"

git-content delete --path="test3.json" --auth="XXXXXXXXXXX" --owner="niradler" --branch="master" --repo="config"
Code
const { Store, Model } = require("git-content");

const store = new Store({ owner, repo, auth, branch });
const model = new Model(store, path);
const { text } = await model.get();

Keywords