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

chore: one function per module #22

Merged
merged 12 commits into from
Jun 25, 2024
Merged

chore: one function per module #22

merged 12 commits into from
Jun 25, 2024

Conversation

aleclarson
Copy link
Member

@aleclarson aleclarson commented Jun 25, 2024

Description

By giving each function its own module, we gain some great benefits:

  • New contributors can find their way around easier.

  • Copy-pasting a function from Radashi is simpler than ever. To demonstrate this, let me explain the steps it now takes:

    1. Go to https://github.com/radashi-org/radashi
    2. Press the t key, then type the name of the function you wish to copy-paste
    3. Press the Enter key to navigate to the function's module
    4. Click the copy button or the download button
    5. All done! If the function relies on other Radashi functions, they're already imported from the radashi package specifier, so the copied function will work in your project immediately, no manual edits required.
  • Easier than ever to run tests for a specific function. Just pass the function name to Vitest and it will fuzzy-match the right test file for you!

    # Run tests for `mapValues` in watch mode.
    pnpm vitest mapvalues
    
    # Run tests one time.
    pnpm vitest run mapvalues

Checklist

  • Changes are covered by tests if behavior has been changed or added
  • Tests have 100% coverage
  • If code changes were made, the documentation (in the /docs directory) has been updated

Resolves

@aleclarson aleclarson merged commit b5469a6 into main Jun 25, 2024
4 checks passed
@aleclarson aleclarson added the maintenance An improvement to codebase maintainability label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance An improvement to codebase maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant