1.0.9 • Published 3 years ago

@inventivetalent/gitconfig v1.0.9

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

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

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago