UNPKG

esa-cli

Version:

A CLI for operating Alibaba Cloud ESA Functions and Pages.

18 lines (17 loc) 530 B
import chalk from 'chalk'; import { getSummary } from '../../commands/common/constant.js'; import logger from '../logger.js'; export default class Template { constructor(path, title) { this.path = path; this.title = title; } printSummary() { const list = getSummary(this.title); list.forEach((summary) => { const title = chalk.bold(summary.title); const command = chalk.green(summary.command); logger.log(`${title}: ${command}`); }); } }