0.0.4 • Published 4 years ago

git-content v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

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();
0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago