https://github.com/perry-mitchell/add-newlines
Add newlines to a batch of files, if they aren't already there
https://github.com/perry-mitchell/add-newlines
build-tool codemod devtools formatting newline
Last synced: 28 days ago
JSON representation
Add newlines to a batch of files, if they aren't already there
- Host: GitHub
- URL: https://github.com/perry-mitchell/add-newlines
- Owner: perry-mitchell
- License: mit
- Created: 2017-03-15T07:00:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-14T20:20:37.000Z (about 9 years ago)
- Last Synced: 2025-02-10T14:05:43.036Z (over 1 year ago)
- Topics: build-tool, codemod, devtools, formatting, newline
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Add Newlines
Add newlines to a batch of files, if they aren't already there
[](https://travis-ci.org/perry-mitchell/add-newlines)
[](https://www.npmjs.com/package/add-newlines)
## About
This command-line utility is designed to scrape a list of files to analyse their new line characters. It replaces invalid new-line formats at the end of each file with a single form.
Install it globally to be able to use it anywhere:
```shell
npm install -g add-newlines
# run with addnl:
addnl items/*.*
```
Or locally to use within `package.json` scripts or from within `node_modules/.bin/`:
```shell
npm install add-newlines --save-dev
```
_package.json:_
```json
{
"scripts": {
"newlines": "addnl source/**/*.js"
}
}
```
## Usage
Install the cli globally or locally, and use the `addnl` executable to specify a list of files:
```shell
addnl source/**/*.js
```