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.2.0
  • Source
  • npm
  • Socket score

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

GitHub Folder Sync v1.2.0 Documentation

NPM Version Package License NPM Downloads

Table of contents

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 pushing the large files.

Installation

npm i github-folder-sync

Usage example

import { homedir } from 'os'
import { join } from 'path'
import { GitHubFolderSync } from '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()

API

  • 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 30 Apr 2023

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