Skip to content

Commit

Permalink
ops: add prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Mar 4, 2020
1 parent ec4a1cd commit 9326ff5
Show file tree
Hide file tree
Showing 4 changed files with 792 additions and 56 deletions.
23 changes: 23 additions & 0 deletions bin/ops.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict'

const dependants = require('..')
const { ux } = require('@cto.ai/sdk')

const main = async () => {
const { name } = await ux.prompt([
{
type: 'input',
name: 'name',
message: 'Name of the module to search',
default: 'express'
}
])
for await (const dependant of dependants(name)) {
console.log(dependant)
}
}

main().catch(err => {
console.error(err)
process.exit(1)
})
2 changes: 1 addition & 1 deletion ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ commands:
public: true
sdk: '2'
sourceCodeURL: 'https://github.com/juliangruber/npm-dependants'
run: node /ops/bin/npm-dependants.js
run: node /ops/bin/ops.js
Loading

0 comments on commit 9326ff5

Please sign in to comment.