@saber2pr/git

0.0.2 • Public • Published

@saber2pr/git

simple git.

yarn add @saber2pr/git

Example

import { diff, commit } from "@saber2pr/git"

const rootDir = "./test"
const commits = await diff(rootDir)
await commit(commits)

commits like this:

[
  {
    "type": "create",
    "master": { "path": "./test/item2.md", "text": "233\n" },
    "origin": { "path": "__test__/item2.md" }
  },
  {
    "type": "update",
    "master": { "path": "./test/item2.md", "text": "qwq\n" },
    "origin": { "path": "__test__/item2.md", "text": "233\n" }
  },
  {
    "type": "delete",
    "master": { "path": "./test/item2.md" },
    "origin": { "path": "__test__/item2.md" }
  }
]

start

yarn install
yarn start

yarn test

Author: saber2pr

Readme

Keywords

none

Package Sidebar

Install

npm i @saber2pr/git

Weekly Downloads

2

Version

0.0.2

License

ISC

Unpacked Size

22.7 kB

Total Files

23

Last publish

Collaborators

  • saber2pr