Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@saber2pr/github-edit

Saber2pr11ISC0.0.4TypeScript support: included

Github Content CURD API.

readme

@saber2pr/github-edit

Github Content CURD API.

yarn add @saber2pr/github-edit

Example

import {
  login,
  unLogin,
  getContentTree,
  createFile,
  removeFile,
  readFile,
  getCommit
} from "@saber2pr/github-edit"

// 1. login
login(username, password)

// 2. content tree
getContentTree(repo)

// 3. createFile
createFile(repo, path, commit)

// 4. removeFile
removeFile(repo, path, commit)

// 5. readFile
readFile(repo, path)

// 6. get Commit Info
getCommit(repo, path)

// 7. unLogin
unLogin()

start

yarn install
yarn start

yarn dev

Author: saber2pr