UNPKG

@royli/hygen

Version:

The scalable code generator that saves you time.

19 lines (16 loc) 401 B
import { ActionResult } from '../types' import createResult from './result' const notEmpty = x => x && x.length > 0 const echo = async ( { attributes: { echo }}, _args:any, { logger }, ): Promise<ActionResult> => { const result = createResult('shell', echo) if (notEmpty(echo)) { logger.colorful(echo) return result('executed') } return result('ignored') } export default echo