git-control-js

javascript git wrapper

MIT License

Downloads
1.9K
Stars
0
Committers
3

@himenon/git-control-js

Wrapper for using git commands in Node.js.

Install

yarn add @himenon/git-control-js

Usage

import * as GitControl from "@himenon/git-control-js";

const main = async () => {
  const git = GitControl.Wrap.create(process.cwd());
  await git.clone({
    owner: "Himenon",
    repo: "git-control-js",
    branch: "main",
    baseUrl: "https://github.com",
    baseSsh: "[email protected]",
    protocol: "https",
    outputDir: process.cwd(),
    authToken: "", // https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#http-based-git-access-by-an-installation
  });

  const latestCommitDate = await git.getLatestCommitDate()
  console.log(latestCommitDate);
}

main().catch(error => {
  console.error(error);
  process.exit(1);
})

Development

scripts description
build typescript build and create proxy directory
clean clean up
format:code prettier
format:yarn:lock yarn.lock deduplicate
lerna:version:up lerna version up
test execute test:depcruise, test:jest
test:depcruise dependency-cruiser's test
test:jest jest test
ts execute ts-node
release:github:registry publish github registry
release:npm:registry publish npm registry

Features

Release

  • Automatic version updates are performed when merged into the main branch.

LICENCE

@himenon-git-control-js・MIT

Package Rankings
Top 11.73% on Npmjs.org