Skip to content

Instantly share code, notes, and snippets.

@bodazhao
bodazhao / copy-folders-exclude-node-modules.js
Last active Apr 4, 2018
Copy a folder and subfolders without all the `node_modules` folders within... tested with Node v9.10.1
View copy-folders-exclude-node-modules.js
// yarn add fs-extra --dev
const fs = require("fs-extra");
console.log("*** start ***");
// replace ".src" with your own folder
fs
.copy("./src", "./dist", {
filter: path => {
// console.log("path ===", path);
@bodazhao
bodazhao / .bash_profile
Created Jan 9, 2019
Minimal Bash shell prompt
View .bash_profile
# in ~/.bash_profile
# \W The basename of $PWD, with $HOME abbreviated with a tilde
# full list: https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html
export PS1="\W \$ "