Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanburnette/html-remove-empty-lines
https://github.com/ryanburnette/html-remove-empty-lines
Last synced: 17 days 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 (almost 4 years ago)
- Last Synced: 2024-12-21T03:24:58.161Z (about 2 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)
[![repo](https://img.shields.io/badge/repository-Github-black.svg?style=flat-square)](https://github.com/ryanburnette/html-remove-empty-lines)
[![npm](https://img.shields.io/badge/package-NPM-green.svg?style=flat-square)](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'));
```