Skip to content

Commit

Permalink
fix(deno): import UIOptions from definitions (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Nov 8, 2020
1 parent 2acc5a2 commit f04f343
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: bcoe/release-please-action@v2.5.5
- uses: bcoe/release-please-action@v2.6.0
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion deno.ts
@@ -1,5 +1,6 @@
// Bootstrap cliui with CommonJS dependencies:
import { cliui, UIOptions, UI } from './build/lib/index.js'
import { cliui, UI } from './build/lib/index.js'
import type { UIOptions } from './build/lib/index.d.ts'
import { wrap, stripAnsi } from './build/lib/string-utils.js'

export default function ui (opts: UIOptions): UI {
Expand Down
6 changes: 3 additions & 3 deletions lib/index.ts
Expand Up @@ -12,7 +12,7 @@ const left = 3

export interface UIOptions {
width: number;
wrap: boolean;
wrap?: boolean;
rows?: string[];
}

Expand Down Expand Up @@ -47,7 +47,7 @@ export class UI {

constructor (opts: UIOptions) {
this.width = opts.width
this.wrap = opts.wrap
this.wrap = opts.wrap ?? true
this.rows = []
}

Expand Down Expand Up @@ -384,6 +384,6 @@ export function cliui (opts: Partial<UIOptions> = {}, _mixin: Mixin) {
mixin = _mixin
return new UI({
width: opts.width || getWindowWidth(),
wrap: opts.wrap !== false
wrap: opts.wrap
})
}

0 comments on commit f04f343

Please sign in to comment.