@inventivetalent/gitconfig
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

gitconfig

Install
npm install --save @inventivetalent/gitconfig
Public Repo Example
import GitConfig from "@inventivetalent/gitconfig"

// Set source for all config files
GitConfig.source = "https://raw.githubusercontent.com/me/myrepo/master/";

// Load config.json from the source
const myConfig = await GitConfig.get("config.json");

// Invalidate changes
await myConfig.invalidate();
Private Repo Example
import GitConfig from "@inventivetalent/gitconfig"

// GitHub authorization + raw
GitConfig.axiosInstance.defaults.headers["Authorization"] = "token MyGithubToken";
GitConfig.axiosInstance.defaults.headers["Accept"] = "Application/vnd.github.v3.raw";

// Set source for all config files
GitConfig.source = "https://api.github.com/repos/me/myrepo/";

// Load config.json from the source
const myConfig = await GitConfig.get("config.json");

// Invalidate changes
await myConfig.invalidate();

Readme

Keywords

none

Package Sidebar

Install

npm i @inventivetalent/gitconfig

Weekly Downloads

2

Version

1.0.9

License

MIT

Unpacked Size

19.4 kB

Total Files

13

Last publish

Collaborators

  • inventivetalent