UNPKG

@enspirit/emb

Version:

A replacement for our Makefile-for-monorepos

16 lines (15 loc) 564 B
import YAML from 'yaml'; import { FlavoredCommand, getContext } from '../../index.js'; export default class ConfigPrint extends FlavoredCommand { static description = 'Print the current config.'; static enableJsonFlag = true; static examples = ['<%= config.bin %> <%= command.id %>']; async run() { const { flags } = await this.parse(ConfigPrint); const context = await getContext(); if (!flags.json) { this.log(YAML.stringify(context.monorepo.config)); } return context.monorepo.config; } }