copy-git v0.1.0
copy-git
Copy files from external git repos and easily pull updates.
Install
npm install copy-gitCopy from git to local
Usage
copy-git [srcRepo] [srcPath...] [destPath]
Examples
Copy this project's src files to your current directory:
copy-git git@github.com:winton/copy-git.git "src/*.ts" .The command generates a file .copygit.yml, which allows you to update copied files.
Add a pound sign at the end of the srcRepo to copy files from a specific version:
copy-git git@github.com:winton/copy-git.git#6093d11 "src/*.ts" .Update copied files
Usage
copy-git [destPath...]
Examples
To update all copied files, run copy-git without arguments from a directory that has a .copygit.yml file:
copy-gitYou may also limit the updates to certain files:
copy-git src/*Find/replace after copy
Usage
copy-git [srcRepo] [srcPath...] [destPath] -f FIND -r REPLACE
Examples
The -f (find) and -r (replace) options transform copied files:
copy-git git@github.com:winton/copy-git.git "src/*.ts" src/copyGit -f CopyGit -r CopyGit2The -f option may also be a regular expression:
copy-git git@github.com:winton/copy-git.git "src/*.ts" src/copyGit -f "/([cC])opyGit/g" -r "$1opyGit2"You may specify more than one find/replace by adding more -f FIND -r REPLACE arguments.