eol-converter-cli

1.1.0 • Public • Published

Newlines (EOL) converter CLI

Having troubles with different line endings? 😳

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

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! 😏

Please give project ⭐ if you like it!

License

Apache 2.0 © Juraj Husár

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.07,836latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.07,836
1.0.81,094
1.0.71
1.0.61
1.0.52
1.0.41
1.0.31
1.0.21
1.0.11
1.0.01
0.0.42
0.0.31
0.0.21
0.0.11

Package Sidebar

Install

npm i eol-converter-cli

Weekly Downloads

8,944

Version

1.1.0

License

Apache 2.0

Unpacked Size

14 kB

Total Files

10

Last publish

Collaborators

  • jurosh