lec
Command Line Wrapper for Line Ending Corrector (An utility that makes sure your files have consistent line endings)
Last updated 5 years ago by ishafayet .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lec 
SYNC missed versions from official npm registry.

lec

Command Line Wrapper for Line Ending Corrector (A utility that makes sure your files have consistent line endings)

about line-ending-corrector

It converts all those pesky \r\n (a.k.a CRLF) line endings in Microsoft Windows operating systems into the more commonly used and recognized \n (a.k.a LF). Though it lets you do the opposite as well ( converting LF to CRLF ). It supports \r (a.k.a CR) as well for the sake of completion.

You should definitely have this in your build process especially if someone in your team works from a non UNIX system.

View the programmatic API here

Installation

For usage from the command line

[sudo] npm install -g lec

Usage from the command line

To operate on a single file inplace (the file will only be altered if any inconsistent line endings are found)

lec <filename>

To operate on a single file with a diffrent output file name.

lec <filename> -o <output-filename>

To operate on all the files in the current dirrectory

lec -d

To operate on all the files in a directory

lec -d <directory>

To operate on all the files in a directory and all subdirectories recursively

lec -d -r <directory>

To use CRLF instead of LF as the desired End Of Line character

lec <filename> --eolc CRLF

Full Command Line Help

  Usage: lec <filename> [options]

  Options:

    -h, --help                          output usage information
    -V, --version                       output the version number
    -o, --output <filename>             Output File Path
    -r, --recursive                     Run the algorithm recursively
    -f, --force-write                   Forcefully (over)write the destination file
    -d, --directory                     Apply on the contents of a directory
    -c, --eolc <End Of Line Character>  End of Line Character
    -e, --encoding <encoding>           Preferred Encoding
    -v, --verbose                       Output additional information
    -n, --nodot                         Ignore Dot Files

Contributing

We actively check for issues even for the least used repositories (unless explicitly abandoned). All of our opensource repositories are being used in commercial projects by teamO4 or bbsenterprise. So, it is very likely that we will sort out important issues not long after they are posted.

Please create a github issue if you find a bug or have a feature request.

Pull requests are always welcome for any of our public repos.

Current Tags

  • 1.0.1                                ...           latest (5 years ago)

6 Versions

  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 1
Last Month 11
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |