-
Notifications
You must be signed in to change notification settings - Fork 1
Command manager
Viktor Likin edited this page Mar 18, 2020
·
8 revisions
(async function () {
const {runCommand} = require('../src/cli')
await runCommand(
[
{
name: 'print',
title: 'Prints values',
handler: async ({request, injection: {console, DateFactory}}) => {
console.log(`I am printing you - ${request.values.join(' --> ')} - now at ${new DateFactory()}`)
return true
}
},
],
{
DateFactory: Date
},
process.argv.slice(2)
)
})()