linenoise.c 2.2026.1 → 2.2026.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -62,7 +62,7 @@ Send feedbacks to antirez at gmail
62
62
 
63
63
  Run:
64
64
 
65
- ```sh
65
+ ```bash
66
66
  $ npm i linenoise.c
67
67
  ```
68
68
 
@@ -70,32 +70,24 @@ And then include `linenoise.h` as follows:
70
70
 
71
71
  ```c
72
72
  // main.c
73
- #include "node_modules/linenoise.c/linenoise.h"
73
+ #define LINENOISE_IMPLEMENTATION
74
+ #include <linenoise.h>
74
75
 
75
76
  int main() { /* ... */ }
76
77
  ```
77
78
 
78
- And then compile with `clang` or `gcc` as usual.
79
+ Finally, compile while adding the path `node_modules/linenoise.c` to your compiler's include paths.
79
80
 
80
81
  ```bash
81
- $ clang main.c # or, use gcc
82
- $ gcc main.c
83
- ```
84
-
85
- You may also use a simpler approach:
86
-
87
- ```c
88
- // main.c
89
- #include <linenoise.h>
90
-
91
- int main() { /* ... */ }
82
+ $ clang -I./node_modules/linenoise.c main.c # or, use gcc
83
+ $ gcc -I./node_modules/linenoise.c main.c
92
84
  ```
93
85
 
94
- If you add the path `node_modules/linenoise.c` to your compiler's include paths.
86
+ You may also use a simpler approach with the [cpoach](https://www.npmjs.com/package/cpoach.sh) tool, which automatically adds the necessary include paths of all the installed dependencies for your project.
95
87
 
96
88
  ```bash
97
- $ clang -I./node_modules/linenoise.c main.c # or, use gcc
98
- $ gcc -I./node_modules/linenoise.c main.c
89
+ $ cpoach clang main.c # or, use gcc
90
+ $ cpoach gcc main.c
99
91
  ```
100
92
 
101
93
 
@@ -425,6 +417,7 @@ This approach tests linenoise as users actually experience it, catching renderin
425
417
  <br>
426
418
 
427
419
 
420
+ [![](https://raw.githubusercontent.com/qb40/designs/gh-pages/0/image/11.png)](https://wolfram77.github.io)<br>
428
421
  [![SRC](https://img.shields.io/badge/src-repo-green?logo=Org)](https://github.com/antirez/linenoise)
429
422
  [![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)
430
423
  ![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/linenoise.c)