This package has been deprecated

Author message:

Use fs-extra instead.

smash-copy

0.0.1 • Public • Published

smash-copy

Copy file or directory.

Install

npm i --save smash-copy
# or
yarn add smash-copy

Usage

Copy file.

const Copier = require('smash-copy');

const fileSrc = path.resolve(cwd, './index.js');
const fileDst = path.resolve(cwd, './temp/index.js');
const { error } = Copier.copySync(fileSrc, fileDst);
if (error) {
    console.error(error.message);
} else {
    // TODO Finish copying.
}

Copy directory.

const Copier = require('smash-copy');

const dirSrc = path.resolve(cwd, './temp');
const dirDst = path.resolve(cwd, './temp.copy');
const { error } = Copier.copySync(dirSrc, dirDst);
if (error) {
    console.error(error.message);
} else {
    // TODO Finish copying.
}

Links

Package Sidebar

Install

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

5.61 kB

Total Files

4

Last publish

Collaborators

  • erye