SamKirkland / ftp-deploy

Deploy websites over FTP with one command line
MIT License
89 stars 43 forks source link

Exclude files via script/deploy only dist directory #15

Closed sc00 closed 2 years ago

sc00 commented 3 years ago

Hi, is it possible to exclude files like package.json from deployment via script + CLI as well? Or is it perhaps possible to only sync a specific directory like "dist"? Thanks and cheers

SamKirkland commented 2 years ago

Yes! If you want to see the help section simply run the ftp-deploy without any options.

Exclude expects an array of patterns to exclude. Because its an array specify the exclude option more than once.

Example (untested code):

ftp-deploy --server ftp.samkirkland.com --username test@samkirkland.com --password \"CrazyUniquePassword&%123\" --exclude dist/** --exclude **/.git* --exclude **/.git*/** --exclude **/node_modules/** --exclude **/package.json