Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.

Add new files#46

Open
YazTepRod wants to merge 8 commits into
Laboratoria:masterfrom
YazTepRod:master
Open

Add new files#46
YazTepRod wants to merge 8 commits into
Laboratoria:masterfrom
YazTepRod:master

Conversation

@YazTepRod

Copy link
Copy Markdown

Validación de links totales y únicos

@reloadercf reloadercf left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yaz me gusta que tu librería resuelve el reto, tengo algunas recomendaciones, la primera es recordarte que esta librería la vas a integrar a tu portafolio de trabajo y debes integrar ayuda o documentación sobre la instalación y lógica que maneja tu librería, eso lo puedes agregar en tu README, otra recomendación es que aproveches las funcionalidades de GitHub, me percate que solo usaste 2 commits, te estas perdiendo de explotar al máximo GitHub, y la ultima recomendación es sobre los test, recuerda puedes usar los test para saber si tu librería trabaja bien a largo plazo, pero si te das cuenta saber si una función es una función no ayuda a ese objetivo de saber si tu librería sigue funcionando a largo plazo, puedes complementar eso con datos reales. Algo que quiero destacar es el aprendizaje del uso de funciones, eso se nota que lo tienes bien dominado.

Comment thread .gitignore
@@ -0,0 +1 @@
node_modules

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

que cool que excluyas node_modules/ seria bueno que tus ejemplos de md pudiesen vivir dentro de una carpeta assets y a su vez ser excluidos.

Comment thread package.json
{
"name": "cdmx009-mdlinks",
"version": "1.0.0",
"description": "\"Validate MarkDown Links\"",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tu descripción debe contener más información de lo que hace tu librería.

Suggested change
"description": "\"Validate MarkDown Links\"",
"description": "\"Validate MarkDown Links and generate stats\"",

Comment thread src/LINKS.md
@@ -0,0 +1,102 @@
POKENDIA GO!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

este archivo debe ir en una carpeta llamada assets y a su vez la carpeta debe ser excluida.

Comment thread src/PRUEBA.md
@@ -0,0 +1,37 @@
Data Lovers, viaje extendido

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

este archivo debe estar en assets y a su vez excluido.

Comment thread src/index.js
Comment on lines +3 to +10
const mdLinks = require('./md.js')
const fetch = require('node-fetch');
const chalk = require('chalk');
const pathDoc = process.argv[2];
let options = {
validate: false,
stats: false
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

es bueno ver esta declaración de variables usando const para variables las cuales el valor no muta y usando let para cuando el valor muta.

Comment thread src/md.js

const arrayLinksMd = [];

for (let i in linksMatchInMd) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

esta raro el for, solo quiero recordarte su estructura for(let i=algo, i<=n, i++) lo conforma la asignación, después la evaluación y por ultimo la reacción en caso de que se cumpla.

Suggested change
for (let i in linksMatchInMd) {
for (let i in linksMatchInMd) {

Comment thread src/md.js
Comment on lines +25 to +29
arrayLinksMd.push({
href: urlsLinksMd.substring(1, urlsLinksMd.length - 1),
text: textLinksMd.substring(1, textLinksMd.length - 1).slice(0,49),
file: pathDocument
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tal vez solo con el link y el text es suficiente

Suggested change
arrayLinksMd.push({
href: urlsLinksMd.substring(1, urlsLinksMd.length - 1),
text: textLinksMd.substring(1, textLinksMd.length - 1).slice(0,49),
file: pathDocument
});
arrayLinksMd.push({
href: urlsLinksMd.substring(1, urlsLinksMd.length - 1),
text: textLinksMd.substring(1, textLinksMd.length - 1).slice(0,49)
});

Comment thread src/md.js
}
resolve(arrayLinksMd);
} else {
console.log('No es un archivo .md...Ingrese de nuevo');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En ingles

Suggested change
console.log('No es un archivo .md...Ingrese de nuevo');
console.log('Not an .md file ... Please login again');

Comment thread test/test.spec.js

describe('mdLinks', () => {

it('Debería ser una función', () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En ingles

Suggested change
it('Debería ser una función', () => {
it('It should be a function', () => {

Comment thread test/test.spec.js
});

});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considero que los test los puedes complementar implementando tus funciones y con valores reales y esperando respuestas concretas como por ejemplo: pasarle el link let arrayLink=['https://google.com'] y esperando la respuesta "status=200 https://google.com ok"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants