Skip to content

Instantly share code, notes, and snippets.

@bernbecht
Created April 8, 2016 19:39
Show Gist options
  • Save bernbecht/cd9ba1bf6e4ab6c0b361259eafcb4497 to your computer and use it in GitHub Desktop.
Save bernbecht/cd9ba1bf6e4ab6c0b361259eafcb4497 to your computer and use it in GitHub Desktop.
require('shelljs/global');
var moduleName = "moduleName",
mainPath = "app/modules/",
visibility = "public",
full_path = mainPath + visibility + "/" + moduleName + "/";
console.log("------ Creating module " + moduleName + " as " + visibility + " --------");
console.log("-> full path: " + full_path);
if (!test('-d', full_path)) {
mkdir('-p', full_path);
} else {
console.log("! existing folder: " + full_path);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment