You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **v4 Breaking change** The CLI command has been seperated into it's own repo [`truwrap-cli`][2]
23
+
22
24
Many current tty text wrapping solutions have issues with the 'long' and currently 'non-standard' RGB SGR codes (i.e `^[[38;2;204;51;66m`). This meant that, while it's possible to have wonderful, rich, full gamut colours and the aesthetic data visualisations it entails, it comes at the price of painful typography and corrupted console displays as text is broken up, unnaturally wrapped and becoming unreadable as the SGR codes are dashed against the rocks of 1980's shortsightedness, confusing your terminal and ever so slightly breaking the heart of design aware coders and administrators everywhere.
23
25
24
26
_Clearly this is unnacceptable!_
@@ -27,11 +29,7 @@ Previously, the only solution was to take a last, long whistful look at how grea
27
29
28
30
But weep no more!
29
31
30
-
Developed as part of our internal data visualisation system, where having the fidelity of 24 bit colour and embedded images (currently OS X iTerm 3 only) was a huge advantage.
31
-
32
-
Usable within your own node.js cli projects and an npm module or directly from the command line as a shell scripting command.
33
-
34
-
![Screengrab][grab]
32
+
Developed as part of our internal data visualisation system, where having the fidelity of 24 bit colour and embedded images (currently macOS iTerm only) was a huge advantage.
35
33
36
34
## Usage
37
35
@@ -55,12 +53,63 @@ var contentWidth = writer.getWidth()
55
53
56
54
writer.write("Some text to write...", "...and some more.")
57
55
writer.write("A new paragraph, if not implicitly present.")
58
-
writer.end()
56
+
writer.end() // Close the stream
57
+
```
58
+
As `outStream` was specified, wrapped output is written directly to the stream.
Copy file name to clipboardexpand all lines: src/docs/readme.md
+4-6
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
${badges}
6
6
7
+
> **v4 Breaking change** The CLI command has been seperated into it's own repo [`truwrap-cli`][2]
8
+
7
9
Many current tty text wrapping solutions have issues with the 'long' and currently 'non-standard' RGB SGR codes (i.e `^[[38;2;204;51;66m`). This meant that, while it's possible to have wonderful, rich, full gamut colours and the aesthetic data visualisations it entails, it comes at the price of painful typography and corrupted console displays as text is broken up, unnaturally wrapped and becoming unreadable as the SGR codes are dashed against the rocks of 1980's shortsightedness, confusing your terminal and ever so slightly breaking the heart of design aware coders and administrators everywhere.
8
10
9
11
_Clearly this is unnacceptable!_
@@ -12,11 +14,7 @@ Previously, the only solution was to take a last, long whistful look at how grea
12
14
13
15
But weep no more!
14
16
15
-
Developed as part of our internal data visualisation system, where having the fidelity of 24 bit colour and embedded images (currently OS X iTerm 3 only) was a huge advantage.
16
-
17
-
Usable within your own node.js cli projects and an npm module or directly from the command line as a shell scripting command.
18
-
19
-
![Screengrab][grab]
17
+
Developed as part of our internal data visualisation system, where having the fidelity of 24 bit colour and embedded images (currently macOS iTerm only) was a huge advantage.
20
18
21
19
## Usage
22
20
@@ -26,4 +24,4 @@ ${usage}
26
24
Full documentation can be found at [https://thebespokepixel.github.io/truwrap/][1]
0 commit comments