You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

fs-extra-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-extra-cli - npm Package Compare versions

Comparing version

to
0.0.3

27

lib/index.js
#! /usr/bin/env node
var argv = require('yargs').argv;
var fse = require('fs-extra');
var prompt = require('prompt');
var yargs = require('yargs').argv;

@@ -75,2 +75,7 @@ /**

// because booleans seems to not play nicely with prompt and yargs :(
// https://github.com/flatiron/prompt/issues/151
options.clobber = options.clobber === 'false' ? false : true;
options.preserveTimestamps = options.preserveTimestamps === 'false' ? false : true;
// using a generic name, as it can be file(s) or folder(s)

@@ -104,4 +109,3 @@ // convert the string into an Array

function init() {
var task = process.argv[2];
var task = argv.task;
var copySchema = {

@@ -118,16 +122,13 @@ properties: {

type: 'string',
required: false,
default: 'dist'
},
clobber: {
description: 'Do you wish to overwrite existing file or directory?',
type: 'boolean',
required: false,
default: false
description: 'Do you wish to overwrite existing files or directories?',
type: 'string',
default: 'false'
},
preserveTimestamps: {
description: 'Preserve source file/folder(s) timestamps?',
type: 'boolean',
required: false,
default: false
type: 'string',
default: 'false'
}

@@ -167,5 +168,5 @@ }

// allows users to specify options via command line diretly,
// allows users to specify options via command line directly,
// bypassing the prompts
prompt.override = argv
prompt.override = argv;

@@ -172,0 +173,0 @@ prompt.start();

{
"name": "fs-extra-cli",
"version": "0.0.2",
"version": "0.0.3",
"description": "A cli wrapper for node-fs-extra",

@@ -5,0 +5,0 @@ "repository": "https://github.com/schalkneethling/fs-extra-cli",

@@ -28,3 +28,3 @@ # node-fs-extra-cli

```
fsys copy
fsys task=copy
```

@@ -35,3 +35,3 @@

```
fsys copy --filesFolder one,two,three --destination folder --clobber false --preserveTimestamps false
fsys task=copy --filesFolders=one,two,three --destination=folder --clobber='false' --preserveTimestamps='false'
```

@@ -48,3 +48,3 @@

```
fsys mkdir
fsys task=mkdir
```

@@ -55,3 +55,3 @@

```
fsys mkdir --dir some/folder
fsys task=mkdir --dir=some/folder
```

@@ -68,3 +68,3 @@

```
fsys emptyDir
fsys task=emptyDir
```

@@ -75,3 +75,3 @@

```
fsys emptyDir --dir some/folder
fsys task=emptyDir --dir=some/folder
```

@@ -88,3 +88,3 @@

```
fsys remove
fsys task=remove
```

@@ -95,3 +95,3 @@

```
fsys remove --fileFolder some/folder
fsys task=remove --fileFolder=some/folder
```