https://github.com/jurosh/nodejs-eol-converter-cli
Newline (EOL) coverter CLI for NodeJs. CRLF -> LF or backwards conversion.
https://github.com/jurosh/nodejs-eol-converter-cli
converter eol lines nodejs
Last synced: 2 months ago
JSON representation
Newline (EOL) coverter CLI for NodeJs. CRLF -> LF or backwards conversion.
- Host: GitHub
- URL: https://github.com/jurosh/nodejs-eol-converter-cli
- Owner: jurosh
- License: apache-2.0
- Created: 2017-06-28T13:52:35.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-07-31T14:55:50.000Z (11 months ago)
- Last Synced: 2025-04-23T11:23:53.852Z (2 months ago)
- Topics: converter, eol, lines, nodejs
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 40
- Watchers: 3
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-software-engineering-tools - eolConverter - g eol-converter-cli**\]: Unter Windows benötigen Sie u.a. für das Repo-RampUp meist ein Werkzeug für EOL-Konvertierungen, u.a. für: (git)
README
# Newlines (EOL) converter CLI
*Having troubles with different line endings?* :flushed:
This library will simply convert files of your choice to Windows (`CRLF`), or popular `LF` line ends used on Linux and Mac.
Installation:
```
npm i -g eol-converter-cli
```API: `eolConverter OptionalModifier "glob_files_regex"`
* *OptionalModifier* can be empty, `warmup`, or `crlf` - see examples.
* For files paths resolution is used [GLOB regex](https://www.npmjs.com/package/glob)## Examples
Run just warmup - to see which files will be affected:
```
eolConverter warmup "**/*.js"
```Run conversions (cannot be undone):
**To LF (Unix & Mac default)**
```
eolConverter "**/*.js"
eolConverter "**/*.{js,jsx,ts,tsx}"
eolConverter "src/**/*.js"
eolConverter "{src,tests}/**/*.js"
```**To CRLF (Windows default)**
```
eolConverter crlf "**/*.js"
```## Tips
PS: Don't forget to configure you favourite IDE to work with desired line endings, so that you won't need this tool again! :smirk:
**Please give project :star: if you like it!**
## License
Apache 2.0 © [Juraj Husár](https://jurosh.com)