1.0.1 • Published 2 years ago
sanm-mdlinks v1.0.1
Sanmdlinks
Index
1. About
Sanmdlinks
is a library that allows you to know the status of the links contained within your markdown (.md) files. You can enter the path for files and directories.
Also, it allows you to know some statistics that could help you, such as knowing the total number of links, how many are broken and the unique links.
2. Installation
Enter the following commands to install it.
npm install @sharonavarro/md-links
3. Usage
sanmdlinks <path> [option]
You have two options at your disposal and more than one way to use it! Here you will see the following cases
sanmdlinks
- If you just enter the command
sanmdlinks
it will show you an introductory message
sanmdlinks <path>
- If you add the path, either file or directory, it will give you information such as the link, the text that represents it in the Markdown file and its absolute path.
sanmdlinks <path> --validate
- Whether the request returns an optimal status code and no errors from either the client or the server, it will let you know that it is "ok", otherwise it will return "Fail".
sanmdlinks <path> --stats
- Total links in a file as well as the number of unique links contained in it.
sanmdlinks <path> --validate --stats
- Apart from the other two statistics seen above, there is a plus, which is knowing how many links are broken.
sanmdlinks <path> --help
4. Program flow
API
This flowchart can help you understand how the library works and what principles the responses follow.
5. More about
This project was implemented with...
- Javascript.
- Node.js.
- Npm.
- Jest.
- ESlint.
Its dependencies were...
- node-fetch.
- marked.
- jsdom.
- figlet.
- chalk.
Thank you!