@yakad/sync
v1.0.6
Published
A file synchronization tool for copying files from template repositories
Downloads
19
Readme
@yakad/sync
A file synchronization tool for copying files from template repositories.
Features
- Clone or update Git repositories
- Copy files and folders from template repos to your project (excluding .git)
- Support for
.syncignorefiles to exclude specific files and directories - Command-line interface with configurable options
Installation
npm install @yakad/syncUsage
Command Line
# Basic usage - copies all files from the repo
yakad-sync -r https://github.com/username/template-repo.git
# Specify target directory
yakad-sync -r https://github.com/username/template-repo.git -t ./my-project
# Enable verbose output to see what's being copied
yakad-sync -r https://github.com/username/template-repo.git -vOptions
-r, --repo <url>: Git repository URL to sync from (required)-t, --target <dir>: Target directory (default: current directory)-v, --verbose: Enable verbose output to see copied files
Example .syncignore file
See .syncignore.example in this package for a comprehensive example.
How it works
The tool will:
- Clone the repository to
.cache/template-repo(or update if already exists) - Check for a
.syncignorefile in your target directory - Copy all files and folders recursively to your target directory
- Skip files and directories that match patterns in
.syncignore - Skip the
.gitfolder to avoid conflicts - Preserve the exact folder structure from the source repository
License
MIT
