Comparing version 0.1.0 to 0.2.0
'use strict'; | ||
var _ = require('lodash'); | ||
var fs = require('fs'); | ||
@@ -11,2 +10,3 @@ var fsAutocomplete = require('vorpal-autocomplete-fs'); | ||
var interfacer = require('./../util/interfacer'); | ||
var preparser = require('./../preparser'); | ||
@@ -19,4 +19,4 @@ var cp = { | ||
args = args === undefined ? [] : args; | ||
args = _.isArray(args) ? args : args.split(' '); | ||
args = _.filter(args, function (arg) { | ||
args = Array.isArray(args) ? args : args.split(' '); | ||
args = args.filter(function (arg) { | ||
return String(arg).trim() !== ''; | ||
@@ -200,3 +200,3 @@ }); | ||
vorpal.api.cp = cp; | ||
vorpal.command('cp [args...]').option('-f, --force', 'do not prompt before overwriting').option('-n, --no-clobber', 'do not overwrite an existing file').option('-r, --recursive', 'copy directories recursively').option('-R', 'copy directories recursively').autocomplete(fsAutocomplete()).action(function (args, callback) { | ||
vorpal.command('cp [args...]').parse(preparser).option('-f, --force', 'do not prompt before overwriting').option('-n, --no-clobber', 'do not overwrite an existing file').option('-r, --recursive', 'copy directories recursively').option('-R', 'copy directories recursively').autocomplete(fsAutocomplete()).action(function (args, callback) { | ||
args.options = args.options || {}; | ||
@@ -203,0 +203,0 @@ return interfacer.call(this, { |
{ | ||
"name": "cash-cp", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Cross-platform implementation of the Unix 'cp' command.", | ||
@@ -41,3 +41,3 @@ "main": "./dist/commands/cp.js", | ||
"glob": "^6.0.4", | ||
"vorpal": "^1.9.5" | ||
"vorpal": "^1.10.8" | ||
}, | ||
@@ -44,0 +44,0 @@ "engines": { |
@@ -35,2 +35,3 @@ # cash-cp | ||
- [cash-cp](https://npmjs.com/package/cash-cp) | ||
- [cash-false](https://npmjs.com/package/cash-false) | ||
- [cash-kill](https://npmjs.com/package/cash-kill) | ||
@@ -43,2 +44,3 @@ - [cash-ls](https://npmjs.com/package/cash-ls) | ||
- [cash-touch](https://npmjs.com/package/cash-touch) | ||
- [cash-true](https://npmjs.com/package/cash-true) | ||
- [cash-rm](https://npmjs.com/package/cash-rm) | ||
@@ -45,0 +47,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13044
9
309
50
Updatedvorpal@^1.10.8