cl-generate
Version:
A cross-platform CLI tool to generate NestJS clean architecture modules
61 lines (52 loc) • 2.29 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 ${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}⚙️ Create New Project:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}cl n${NC} - Initialize project structure`
);
console.log(` ${GREEN}➜${NC} ${CYAN}cl new${NC} `);
console.log("");
console.log(`${GREEN}🛠 Create Resources:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}cl g res${NC} - Generate a new resource`
);
console.log(` ${GREEN}➜${NC} ${CYAN}cl g resurce${NC}`);
console.log("");
console.log(`${RED}🗑 Remove Resources:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}cl rm res${NC} - Remove an existing resource`
);
console.log(` ${GREEN}➜${NC} ${CYAN}cl rm resurce${NC}`);
console.log("");
console.log(`${YELLOW}ℹ️ Other Commands:${NC}`);
console.log(
` ${GREEN}➜${NC} ${CYAN}cl --help${NC} - Show help message`
);
console.log(` ${GREEN}➜${NC} ${CYAN}cl --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}`);