1.0.0 • Published 4 years ago

mdlinks-elyfg v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Proyecto mdlinks-elyfg

Objetivos

mdlinks-elyfg It is a library that allows you to search for files that mark the paths of an absolute path or of directories. To validate the links it contains, whether they are broken or stable.

DIAGRAMA DE FLUJO MDLINKS

Install

npm i mdlinks-elyfg

CLI (Command Line Interface - Interfaz de Línea de Comando)

The executable of our application must be able to run as follows way through terminal:

mdlinks <path-to-file> [options]

Por ejemplo:

$ mdlinks ./assets/final.md 

Options

--validate

If we pass the --validate option, the module should make an HTTP request to find out if the link works or not. If the link results in a redirect to a URL that responds ok, then we will consider the link as ok.

$ mdlinks ./assets/final.md --validate PATH: C:\Users\eliza\Documents\MdLinks\CDMX009-MdLinks\assets\final.md LINK: https://docs.npmjs.com/getting-started/what-is-npm 200 OK TITLE: NPM

PATH: C:\Users\eliza\Documents\MdLinks\CDMX009-MdLinks\assets\final.md LINK: https://docs.npmjs.com/getting-started/publishing-npm-packages 200 OK TITLE: Publicar packpage

PATH: C:\Users\eliza\Documents\MdLinks\CDMX009-MdLinks\assets\final.md LINK: https://javascript.info/promise-basics 200 OK TITLE: Promise

--stats

If we pass the --stats option the output will be a text with statistics basic on the links.

TOTAL: 3 UNIQUE: 3

We can also combine --stats and--validate to get statistics that need the results of the validation.

TOTAL: 3 UNIQUE: 3 BROKEN: 0