https://github.com/ryanburnette/html-remove-empty-lines
https://github.com/ryanburnette/html-remove-empty-lines
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryanburnette/html-remove-empty-lines
- Owner: ryanburnette
- Created: 2020-10-18T15:25:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-11T15:08:46.000Z (over 4 years ago)
- Last Synced: 2025-02-21T17:04:50.499Z (5 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [html-remove-empty-lines](https://github.com/ryanburnette/html-remove-empty-lines)
[](https://github.com/ryanburnette/html-remove-empty-lines)
[](https://www.npmjs.com/package/@ryanburnette/html-remove-empty-lines)Remove empty lines from HTML.
## Features
- removes empty lines from HTML files
- does not damage formatting within `` tags
- cli helper takes a directory and runs recursively on all `.html` files
- **WARNING** cli helper updates files in place## cli
Install globally with npm to use in your local environment.
```bash
npm install -g @ryanburnette/html-remove-empty-lines
``````bash
html-remove-empty-lines public/
```## npx
With npx, you can install to your project, but it's not required.
```bash
npm install --save @ryanburnette/html-remove-empty-lines
``````bash
npx html-remove-empty-lines public/
```## js
You can also import the `htmlRemoveEmtpyLines` function to utilize it
programmatically.```js
var htmlRemoveEmptyLines = require('@ryanburnette/html-remove-empty-lines');
console.log(htmlRemoveEmptyLines('\n\n'));
```