Skip to content

Commit

Permalink
Switch dependency from wordwrap to word-wrap due to license issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gkz committed Nov 6, 2019
1 parent ad96608 commit bf4b1da
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
19 changes: 16 additions & 3 deletions lib/help.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"dependencies": {
"prelude-ls": "~1.1.2",
"deep-is": "~0.1.3",
"wordwrap": "~1.0.0",
"word-wrap": "~1.2.3",
"type-check": "~0.3.2",
"levn": "~0.3.0",
"fast-levenshtein": "~2.0.6"
Expand Down
2 changes: 1 addition & 1 deletion package.json.ls
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ scripts:
dependencies:
'prelude-ls': '~1.1.2'
'deep-is': '~0.1.3'
wordwrap: '~1.0.0'
'word-wrap': '~1.2.3'
'type-check': '~0.3.2'
levn: '~0.3.0'
'fast-levenshtein': '~2.0.6'
Expand Down
9 changes: 8 additions & 1 deletion src/help.ls
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{id, find, sort, min, max, map, unlines} = require 'prelude-ls'
{name-to-raw, dasherize, natural-join} = require './util'
require! wordwrap
word-wrap = require 'word-wrap'

wordwrap = (a, b) ->
[indent, width] = if b == undefined then
['', a - 1]
else
[' ' * a, b - a - 1]
(text) -> word-wrap text, {indent, width, trim: true}

get-pre-text = (
{option: main-name, short-names = [], long-names = [], type, description}:option,
Expand Down

0 comments on commit bf4b1da

Please sign in to comment.