Closed screendriver closed 8 years ago
We didn't add many options as I didn't want to add the weight of an options parser to every install of cpr
. I'm not opposed to it, I just don't want the added dependency on every install.
You could add yargs. But if you don't want add dependencies it's ok for me. Then I have to look for another Node CLI tool for directory copies. Maybe I write one by myself.
Thank you for the quick response.
No reason to write a new one, you can just wrap cpr
in a custom CLI. It has all the options and it works ;)
Hmm that's true :smile:
I think that it's still necessary for npm scripts. I'd like to overwrite when I copy. I don't understand the concern with dependencies when mkdirp
already uses minimist
.
I created a copy CLI tool by myself for that :wink:
@screendriver that has no overwrite option. It has clobber
, but I think that overwrites the entire directory and not just any files within.
Edit: Hmm, https://github.com/jprichardson/node-fs-extra/blob/0.30.0/lib/copy/ncp.js#L87-L90
Nothing against your library, but having to write your own separate library to accomplish something that a more mature, actively developed library can do is redundant.
Yes it's a little redundant. But what should I do? I needed a cross platform CLI tool that copies and override everything (and follows symbolic links) for our continuous integration system in my company. Unfortunately your CLI can't do that and you don't want to add an option for that. So the only solution was to build my own micro tool that does that job.
@screendriver the other option is to convince this library's author to implement its options in the CLI.
@davglass why not implement access to the options? As mentioned above, mkdirp
already depends on minimist
, so we could easily do the same.
@stevenvachon I originally didn't add a CLI option, it was contributed as a PR a few months ago. I wouldn't object to a full CLI to come in another PR ;)
@screendriver I just published v2.0.0 with the PR from @stevenvachon that adds CLI options.
It is possible to pass the API options as arguments to the CLI interface? E.g.
cpr --overwrite foo bar