Skip to content

Commit

Permalink
feat: remove cli-ux (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Jan 27, 2022
1 parent 09b063a commit 91d8696
Show file tree
Hide file tree
Showing 3 changed files with 1,511 additions and 1,470 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"author": "Salesforce",
"bugs": "https://github.com/oclif/plugin-commands/issues",
"dependencies": {
"@oclif/core": "^1.0.8",
"cli-ux": "^6.0.5",
"@oclif/core": "^1.2.0",
"lodash": "^4.17.11"
},
"devDependencies": {
Expand All @@ -25,7 +24,7 @@
"mocha": "^8",
"nock": "^13.0.0",
"nyc": "^15.1.0",
"oclif": "2.0.0-main.14",
"oclif": "^2.3.0",
"shx": "^0.3.3",
"ts-node": "^9.1.1",
"tslib": "^2.0.0",
Expand Down
8 changes: 3 additions & 5 deletions src/commands/commands.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Command, Flags, toConfiguredId} from '@oclif/core'
import {ux} from 'cli-ux'
import {CliUx, Command, Flags, toConfiguredId} from '@oclif/core'
import * as _ from 'lodash'
import {EOL} from 'os'

Expand All @@ -9,11 +8,10 @@ export default class Commands extends Command {

static enableJsonFlag = true

// to-do: update this type when cli-ux is on core
static flags: any = {
help: Flags.help({char: 'h'}),
hidden: Flags.boolean({description: 'show hidden commands'}),
...ux.table.flags(),
...CliUx.ux.table.flags(),
}

async run() {
Expand Down Expand Up @@ -53,7 +51,7 @@ export default class Commands extends Command {
return formatted
}

ux.table(commands.map(command => {
CliUx.ux.table(commands.map(command => {
// Massage some fields so it looks good in the table
command.description = (command.description || '').split(EOL)[0]
command.summary = (command.summary || (command.description || '').split(EOL)[0])
Expand Down
Loading

0 comments on commit 91d8696

Please sign in to comment.