Package Exports
- @yakad/sync
- @yakad/sync/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@yakad/sync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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