yashsehgal / use-github-react

React hook for fetching activities and information via GitHub API
https://use-github-react.vercel.app
MIT License
1 stars 4 forks source link

Improve the current package generation process #7

Open yashsehgal opened 1 month ago

yashsehgal commented 1 month ago

As of now, the building and package publishing process is not really ideal for use-github-react Although, it works fine by importing things from dist directory but is something not really ideal to have as a better DX.

In this ticket, we can work on improving the complete build flow in such a way that the imports should look like,

import { useGitHub, type IGitHubUserInfo } from 'use-github-react';

This will require the following steps to cover

This fix will be a part of the version issue v1.3.*

well-mannered-goat commented 1 month ago

Hey! I would like to work on this issue

So this would mean that I would have to remove all the content for webpage and just keep the content of src/hooks and then refactor accordingly right?

yashsehgal commented 1 month ago

Accurate @well-mannered-goat - This will the ideal flow. As docs migration is going on in #2 we can remove all the content with our changes.

I am assigning this one to you, thanks for showing interest 😊

yashsehgal commented 1 month ago

Hello @well-mannered-goat - Just wanted to ask for confirmation if you're available for working on this issue. If yes, please share about the solutions you have for this issue. I will surely re-assign you. Thanks!

well-mannered-goat commented 1 month ago

Yes I am available to work on this issue My solutions would include:

  1. Just keep hooks/use-github in src and removing everything else
  2. Updating main in package.json to dist/use-github/index.js also declaring its types
  3. Update tsconfig.json and remove tsconfig.build.json as it might become redundant
  4. Also remove redundant packages if needed
  5. Refactoring the code for exports if needed

Do let me know If I am missing out on something :)

well-mannered-goat commented 1 month ago

Hey can I work on this issue!?