@694pepper/web-sync
v1.0.10
Published
A simple and efficient file synchronization tool using rsync
Maintainers
Readme
web-sync
A simple and efficient file synchronization tool using rsync, designed to be used as a yarn package in your projects.
Installation
yarn add web-syncConfiguration
Create a .env file in your project root with the following variables:
RSYNC_HOST=your-remote-host
RSYNC_PATH=/path/on/remote/hostRSYNC_HOST: The SSH host to sync to (e.g.,[email protected]or an SSH alias)RSYNC_PATH: The destination path on the remote host
Usage
Basic Sync
To sync your files to the remote host:
yarn syncDry Run
To preview what would be synced without making any changes:
yarn sync --dry-runExcluding Files
Create a rsync-exclude file in your project root to specify files and directories that should be excluded from syncing. For example:
node_modules
.git
.env
*.logFeatures
- Simple one-command synchronization
- Support for dry runs
- File exclusion support
- Environment-based configuration
- Uses rsync for efficient file transfers
Requirements
- Node.js
- rsync installed on your system
- SSH access to the remote host
Notes
- Make sure you have SSH access configured for the remote host
- The sync command will sync from the current directory to the specified remote path
- Files listed in
rsync-excludewill be ignored during sync - The sync is performed using rsync's archive mode (-a) with compression (-z) and verbose output (-v)
