Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Oct 12, 2022

Conversation

sinyo-matu
Copy link
Collaborator

@sinyo-matu sinyo-matu commented Oct 7, 2022

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

src/initFile.ts Outdated Show resolved Hide resolved
src/initFile.ts Outdated Show resolved Hide resolved
@sinyo-matu
Copy link
Collaborator Author

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

Copy link
Owner

@xstevenyung xstevenyung left a comment

Choose a reason for hiding this comment

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

Yeah I like this approach a lot, just some minor changes and we should be good to go

src/initFile.ts Outdated Show resolved Hide resolved
src/initFile.ts Outdated Show resolved Hide resolved
Copy link
Owner

@xstevenyung xstevenyung left a comment

Choose a reason for hiding this comment

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

Oops wrong button

@sinyo-matu
Copy link
Collaborator Author

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

@xstevenyung
Copy link
Owner

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

@xstevenyung xstevenyung merged commit e2d542a into xstevenyung:main Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants