vercel / vercel/hyper

Unify the way to get application directory

Open
#4,512 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

There are three places to get application directory:
https://github.com/zeit/hyper/blob/432fc30c3cc4a6b2cb75d5ee78a23bcecd8d57b9/cli/api.ts#L12-L17
https://github.com/zeit/hyper/blob/432fc30c3cc4a6b2cb75d5ee78a23bcecd8d57b9/app/config/paths.ts#L14-L19
https://github.com/zeit/hyper/blob/432fc30c3cc4a6b2cb75d5ee78a23bcecd8d57b9/app/index.ts#L5

You can notice that they are not totally the same.
Hope we can use the same way to get application directory.
And it will be better that we can split this function into a npm package so some plugins (like this) can use it.

I can try to send a PR about this, but I'm not sure if you could accept such a basic function is implemented by a third party library.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the application-directory logic in cli/api.ts, app/config/paths.ts, and app/index.ts at the referenced lines. Determine the shared behavior and whether extracting it for plugin use is in scope; done means the three locations use one consistent approach and the package boundary is decided.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.