watch-and-rsync

1.0.2 • Public • Published

watch-and-rsync

watch and rsync directories across system

Build Status version downloads MIT License PRs Welcome

Usage

npm i watch-and-rsync -g
 
watch-and-rsync -o=start -c=path/to/the/config.js
 
watch-and-rsync -o=stop -c=path/to/the/config.js
 
watch-and-rsync -o=list
// config.js
module.exports = {
  'source': 'path/to/the/source/',
  'target': 'path/to/the/target/',
  'host': 'IP or hostname',
  'excludes': [
    '.git', // for faster syncing
    'build',
    'dist',
    'logs',
    'node_modules',
    'tmp',
    ...
  ]
}

demo - gif

Why?

I work across Mac and Linux. I am neither a vim nor an emacs pro, and thus code in Mac as the Linux boxes are on demand and has only ssh access. But my run time is in Linux, :sigh: not using docker yet.

So far, I have been using launchctl and .plist along with a .sh to watch a desired directory and sync it across the desired Linux system.

Why JavaScript?

Some how, I managed to get the launchctl and .plist working, I don't understand it completely. It's a nightmare when I want to tweak it, thus JavaScript, which I comprehend much better.

Readme

Keywords

Package Sidebar

Install

npm i watch-and-rsync

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

7.41 kB

Total Files

4

Last publish

Collaborators

  • sarbbottam