A lightweight Node.js library to convert CRLF to LF line endings.
It is useful when your development environment is Windows.
웹 개발자에게 Windows OS PC를 제공하는 우리 회사, 당장 반성하라!! 뭐만 하면 windows-cp-949 인코딩에 CRLF 라인피드 때문에 문제가 생겨요. Node.js 개발자한테 Windows PC 제공, 이거 법적으로 금지해야 해요.
- Exclude files from your
.gitignore
- Exclude
.git
andnode_modules
directories on default - Recursive conversion
- Supports multiple file extensions(generally used on Web Development)
If you do not have a Github personal access token, please create CLASSIC token that has
packages: read
permission.
first, edit your .npmrc
file.
@gyeonghokim:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<your-github-personal-access-token>
then, install it.
npm install --save-dev @gyeonghokim/lfify
if you do not want to install it, you can use it with npx
, however, you still need to specify registry and auth token in your .npmrc
file.
npx @gyeonghokim/lfify
npx @gyeonghokim/lfify ./path/to/your/project
"scripts": {
"lfify": "@gyeonghokim/lfify"
}
- JavaScript:
.js
,.jsx
,.cjs
,.mjs
- TypeScript:
.ts
,.tsx
- Web:
.html
,.css
,.scss
,.vue
- Markup/Config:
.json
,.xml
,.yml
,.yaml
,.md
- Other:
.txt
,.env
-
Gitignore Support Automatically reads and respects your .gitignore patterns Skips ignored files and directories
-
Smart Processing Only modifies files that actually need conversion Preserves file encoding Provides detailed logging of all operations
-
Safe Operation Automatically excludes binary files Built-in protection for critical directories Error handling with detailed logging
- Node.js 18 or higher
- npm
Clone the repository:
git clone https://github.com/GyeongHoKim/lfify.git
Install dependencies:
npm install
npm test
npm run lint
- Fork the repository
- Create a new branch
- Make your changes
- Run
npm run lint
to check your code - Run
npm test
to check your code - Submit a pull request
If you have any issues or feedback, please open an issue on the GitHub repository.