Skip to content

mnmandahalf/add-link-rel-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

add-link-rel-cli

CLI to add some attributes on html <a> tags.

npm version

Installation

npm i add-link-rel-cli

Usage

Usage: add-link-rel [options] <filename>

Arguments:
  filename                                               html filename to correct

Options:
  -a, --autofix
  --noreferrer
  --noopener
  --only-target-blank
  -h, --help                                             display help for command

Example

sample.html

<a target="_blank"><li>Sample Link</li></a>
$ add-link-rel --noreferrer --noopener test.html
<a target="_blank" rel="noreferrer noopenner"><li>Sample Link</li></a>