xstevenyung / fresh-seo

The fastest way ⚡️ to create sitemap and robots.txt in your Deno Fresh project 🍋
MIT License
49 stars 5 forks source link

update:add validation functions to validate user input at init.ts script #18

Closed sinyo-matu closed 2 years ago

sinyo-matu commented 2 years ago

Background

In init.ts, I think user input may need some validation to reduce unexpected or confusing behavior.

Move init.ts script contents into src/ may make our code cleaner

What Changed

  1. Adding two validation functions: isValidaUrl and isValidDir
  2. Moving init.ts script contents input src/intiFile.ts
sinyo-matu commented 2 years ago

@xstevenyung Updated. Please check it out! If I got anything wrong, please correct me. It will be very appreciated.

sinyo-matu commented 2 years ago

@xstevenyung If you got time, please have a check!

xstevenyung commented 2 years ago

thanks a lot @sinyo-matu , amazing work ! 👍