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

Add join method #38

Merged
merged 3 commits into from
Nov 28, 2023
Merged

Add join method #38

merged 3 commits into from
Nov 28, 2023

Conversation

Julien-R44
Copy link
Member

@Julien-R44 Julien-R44 commented Nov 25, 2023

Before Adonis V6 and @poppinss/utils, for my ESM projects, I tended to always download [desm](https://github.com/mcollina/desm#readme) for the dirname, filename and join methods. So we have getDirname, getFilename. But join is missing. Which was probably the one I used the most.

I think it's a cool thing to add here, because generally, in ESM we often need to do this.

import { join } from '@poppinss/utils'

join(import.meta.url, '..', 'foo.json')

Instead of

import { join } from 'node:path'
import { getDirname } from '@poppinss/utils'

join(getDirname(import.meta.url), '..', 'foo.json')

@thetutlage
Copy link
Member

Looks good!

@Julien-R44 Julien-R44 deleted the feat/join branch February 18, 2024 19:55
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