Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-folder-sync

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-folder-sync

This library can be used to sync a folder from your device to GitHub. This is a fun project and I do not recommend to push large files.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

github-folder-sync

Description

This library can be used to sync a folder from your device to GitHub. This is a fun project and I do not recommend to push large files.

language license npm version npm download

Installation

npm i github-folder-sync

Usage example

const { homedir } = require('os')
const { join } = require('path')
const { GitHubFolderSync } = require('github-folder-sync')
const gitHubFolderSync = new GitHubFolderSync(
  join(homedir(), 'Desktop', 'my-folder'),
  60_000 * 5, // Sync in every 5 minutes.
  'some-repo',
  'ghp_c23sd2lMESl5nZsDs4Szzsj5Na2SiS1Yu62k',
  'datomarjanidze',
  'main',
)

gitHubFolderSync.start()

Specs

  • GitHubFolderSync class constructor parameters:
    • folderPath {string}: Absolute path of a folder to sync
    • syncInterval {number}: Frequency of sync in milliseconds
    • gitHubRepoName {string}: Repository name on GitHub
    • gitHubToken {string}: Personal access token generated on GitHub
    • gitHubUsername {string}: GitHub username/organization
    • branchName {string}: The name of the branch you want to sync
  • GitHubFolderSync class methods:
    • start: Starts syncing. Return value void
    • stop: Stops syncing. Return value void
    • sync (async): In case it is needed to manually execute sync and not wait until next sync tick. Return value void

Keywords

FAQs

Package last updated on 18 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc