om.copy

0.0.6 • Public • Published

om.copy

node.js npm copy task. glob sytle path selection. filter/excludes. Copy non identical files only.
  • Select source glob style. (use string for a single glob path definition.)
  • Define excludes multi glob style. (use array for multiple glob path definitions.)
  • Define destination path. (use str for plain output path. No glob.)
  • Copy different files only. (Compares files size.)
Example:
// Load module.
var om = require('om.copy');

// Source path.
// Str with Glob style paths selection.
var source = 'app/**';

// Filter.
// Arr with Glob style paths selection:
var exclude = [
    'app/js/**',
    'app/css/**'
];

// Destination Path str. (no glob).
var destination =  'dist/';

// Execute.
om.copy(source, destination, exclude);
ES6 Promise integrated:
om.copy(source, destination, exclude).then(function(){
    // Do Stuff when copy finished...
}).catch(err){
    // track Errors.
});

Package Sidebar

Install

npm i om.copy

Weekly Downloads

0

Version

0.0.6

License

MIT

Last publish

Collaborators

  • feluxe