Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fs = require("fs-extra");
- console.log("*** start ***");
- fs
- .copy("./src", "./dist", {
- filter: path => {
- // console.log("path ===", path);
- // skip filter on files
- if (fs.lstatSync(path).isFile()) return true;
- // return false if path is directory and string contains node_modules
- return !(path.indexOf("node_modules") > -1);
- }
- })
- .then(() => {
- console.log("folder copied successfully!");
- console.log("*** end ***");
- });
Add Comment
Please, Sign In to add comment