copyfy

Copy files/folders recursively on nodejs using a json as config.

Usage no npm install needed!

<script type="module">
  import copyfy from 'https://cdn.skypack.dev/copyfy';
</script>

README

copyfy

Copy folders & files recursively on nodejs using a json as config.

Install

npm install --save-dev copyfy

How to use it:

const Copyfy = require('copyfy');
const config = {
    verbose: false,
    showErrors: false,
    copy: [{
            source: "path1",
            target: "path2",
        },
        {
            source: "path2",
            target: "path3",
            renameTargetFiles: {
                from: new RegExp('fileName', 'g'),
                to: 'newFileName'
            }
        }
    ]
};
const copy = new Copyfy(config);

copy().start().then(
    console.log('Done');
);

Turbo Commit: On