Socket
Socket
Sign inDemoInstall

glob-cp

Package Overview
Dependencies
27
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    glob-cp

copy files and directories with glob patterns and variables.


Version published
Maintainers
1
Install size
534 kB
Created

Readme

Source

glob-cp

copy files and directories with glob patterns and variables.

install

npm install glob-cp

use


var cp = require('glob-cp');

// async
var src = __dirname + '/fixtures/:module/public';
var dest = __dirname + '/public/:module';
var options = {recursive: true, force: true};
cp(src, dest, options, function(err) {
    if (err) console.error(err);
});

//or sync version
cp.sync('fixtures/:module/public', 'public/:module');

you can use the whole glob syntax in the src and dest pattern, as well as the glob-var variables starting with a colon :

functions

cp(srcPattern, destPattern [,options] ,callback)

async glob cp version.

cp.sync(srcPattern, destPattern [,options])

sync glob cp version.

options

// options with the following default values:
var options = {

  // recusively copy files
  recursive: false,

  // remove destination before operation
  force: false

};

test

npm test

license

MIT

Keywords

FAQs

Last updated on 07 Oct 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc