Skip to content

CLI prj-sync allows you to synchronize folders and files using Gitignore configuration files like.

License

Notifications You must be signed in to change notification settings

lp741/prj-sync-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Sync (prj-sync) CLI

CLI prj-sync allows you to synchronize folders and files using Gitignore configuration files like.

Install

npm install -g prj-sync

Configuration

create .psyncrc and .psyncignore follow .gitignore pattern format

Usage

prj-sync -s example -d data-out

# or disable overwrite

prj-sync -s example -d data-out --no-w 

Uninstall

npm uninstall -g prj-sync

Run dev mode

npm run dev -s example -d data-out [--no-w]

pnpm dev -s example -d data-out [--no-w]

yarn dev -s example -d data-out [--no-w]

Run tests

npm run test

pnpm test

yarn test

if you like vitest UI you can launch it by

pnpm test:ui

Example

Add following files to your project root

Includes paths and files

#.psyncrc
.env*
DATA/**/.*
DATA/**/*
*.txt

Ignores sub paths and files

#.psyncignore
to-be-ignored.txt
DATA/folder-to-be-ignored
any-data.json
DATA/some-inside-to-be-ignored/other-data*
$ prj-sync -s example -d data-out -v

Reading files to sync from .psyncrc presents in example folder 

Reading files to be ignored from .psyncignore presents in example folder 

Syncing folder destination data-out 

items to be synced count 6
Folders and files to sync 
 [
  'example/.env',
  'example/DATA/some-inside-to-be-ignored/.env.local',
  'example/DATA/some-inside-to-be-ignored/.to-be-included',
  'example/DATA/sample-data.json',
  'example/DATA/some-inside-to-be-ignored/this-should-be-included.json',
  'example/other-data.txt'
] 


 items synced count 6  overwrite 

DONE ✓ 

About

CLI prj-sync allows you to synchronize folders and files using Gitignore configuration files like.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published