npm install shelljs
const shell = require('shelljs') shell.exec(`cp -a source_path/. destination_path`)
The -a option is an improved recursive option, that preserve all file attributes, and also preserve symlinks.
The . at end of the source path is a specific cp syntax that allow to copy all files and folders, included hidden ones. Updated at 2020-05-07 04:10:05