a function of copy file inside directory use node
npm
$ npm intall copydirectory --save
yarn
$ yarn add copydirectory --save
copydirectory(src, dest, callBack)
- src - source directory
- dest - targert directory
- callBack - invoked when copy file done
Async copy file
var copydirectory = require('copydirectory');
copydirectory('./dist', './build-zip', (error) => {})
Sync copy file
var copydirectory = require('copydirectory');
copydirectory.copyDirSync('./dist', './build-zip')
MIT