npm module for removing html element from .html files
Based on jsdom module
npm install remove-html-element
or
npm install --save remove-html-element
or
npm install --save-dev remove-html-element
To fast test run:
npm install && npm test
For finding html elements jQuery is used, docs for selectors
var rem = require('remove-html-element');
rem('file.html', '#remove-this-selector');
var rem = require('remove-html-element');
rem('file.html', ['#remove-this-selector', '.and-this']);
var rem = require('remove-html-element');
rem([
['file.html'],
['file2.html']
], '#remove-this-selector-in-all-files');
var rem = require('remove-html-element');
rem([
['file.html', ['#remove-this-selector', '.and-this']],
['file2.html', ['#remove-this-selector2', '.and-this2']],
]);
- add tests
- save to another file
- check if file exist
- fix empty lines instead of removed element
- check if selector found
- console coloring
- MIT
- Made by littleguga