JSPM

sb-copy

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q44319F
  • License MIT

Smooth recursive copies in Node.js

Package Exports

  • sb-copy

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sb-copy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Copy

Copy is a node module that allows for smooth recursive copies in Node.js, it provides some shiny options to simplfy your packages.

Installation

npm install -g sb-copy

API

export type Options = {
  filter?: ((source: string, destination: string) => boolean),
  dotFiles?: boolean,
  overwrite?: boolean,
  deleteExtra?: boolean,
  failIfExists?: boolean,
  tickCallback?: ((source: string, destination: string) => void)
}
export default function copy(source: string, destination: string [, options: Options])

Usage

import copy from 'sb-copy'

copy('./lib', './lib2', {
  failIfExists: false,
}).then(function() {
  console.log('all files moved')
}, function(error) {
  console.log('files not moved', error)
})

License

This Project is licensed under the terms of MIT License, see the LICENSE file for more info.