UNPKG

@gameroom/cli

Version:

A command line tool for Gameroom

16 lines (11 loc) 453 B
const pluralize = require('pluralize'), { getStorable, grGreen, prettyPrint } = require('../helpers'), { spinner } = require('../refs') module.exports = async ({ Model, resource }) => { if (pluralize.isPlural(resource)) resource = pluralize.singular(resource) spinner.text = `prototyping ${grGreen(resource)}` spinner.start() const object = new Model() spinner.succeed(`prototyped ${grGreen(resource)}`).stop() prettyPrint(object) }