jonschlinkert / copy

Copy files using glob patterns. Sync, async, promise or streams. (node.js utility)
MIT License
94 stars 125 forks source link

Expose the copy function as a cli command #7

Closed bleathem closed 8 years ago

bleathem commented 8 years ago

This PR exposes the copy function via the command line by registering a bin property in the package.json and applying the first 2 arguments on the command line to the patterns and dir parameters respectively. The return code of the cli script respects the err parameter of the callback, only returning a 0 value when the err is empty.

This is an initial implementation, a more rigorous treatment would expose the copy options object as additional arguments/options in the cli.

bleathem commented 8 years ago

@jonschlinkert is there anything I can do to help get this PR merged? Is there some technical or philosophical reason why you don't want to expose the functionality via the CLI?

My goal with this PR is to be able to use this module in my npm run scripts.

jonschlinkert commented 8 years ago

is there some technical or philosophical reason why you don't want to expose the functionality via the CLI?

sorry no, I missed this somehow. thank you

jonschlinkert commented 8 years ago

Published and tagged. Thanks again!