clean-gen
Version:
A cross-platform CLI tool to generate NestJS clean architecture modules
68 lines (59 loc) • 2.33 kB
JavaScript
// Colors for output
const GREEN = "\x1b[32m";
const YELLOW = "\x1b[33m";
const RED = "\x1b[31m";
const CYAN = "\x1b[36m";
const BLUE = "\x1b[34m";
const MAGENTA = "\x1b[35m";
const NC = "\x1b[0m";
// Header
console.log(`${CYAN}╔══════════════════════════════════════════╗${NC}`);
console.log(
` ${BLUE}✨ ${GREEN}NestJS Clean Architecture Module ${BLUE}✨${NC} `
);
console.log(`${CYAN}╚══════════════════════════════════════════╝${NC}`);
console.log("");
console.log(
`${YELLOW}📚 This script follows Clean Architecture principles${NC}`
);
console.log(`${YELLOW} and helps scaffold your NestJS application${NC}`);
console.log("");
// Commands section
console.log(`${MAGENTA}🌈 Available Commands:${NC}`);
console.log("");
console.log(`${BLUE}⚙️ Project Setup:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}clean setup${NC} - Initialize project structure`
);
console.log("");
console.log(`${GREEN}🛠 Create Resources:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}clean g res${NC} - Generate a new resource`
);
console.log(
` ${GREEN}➜${NC} ${CYAN}clean g module${NC} - Generate a new module`
);
console.log("");
console.log(`${RED}🗑 Remove Resources:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}clean rm res${NC} - Remove an existing resource`
);
console.log(
` ${GREEN}➜${NC} ${CYAN}clean rm module${NC} - Remove an existing module`
);
console.log("");
console.log(`${YELLOW}ℹ️ Other Commands:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}clean --help${NC} - Show help message`
);
console.log(
` ${GREEN}➜${NC} ${CYAN}clean --version${NC} - Display version`
);
console.log("");
// Footer
console.log(`${CYAN}╔══════════════════════════════════════════╗${NC}`);
console.log(
`${BLUE}🔹 ${GREEN}Happy Coding with Clean Architecture! ${BLUE} 🔹${NC}`
);
console.log(`${CYAN}╚══════════════════════════════════════════╝${NC}`);