question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move docs to a separated project inside the repository

See original GitHub issue

I still not happy with the fact that the docs are inside the src folder. It always drive me crazy, 'cause it isn’t part of the librabry. So we should move it to a separated react application inside our repository, and it will also works as an example.

Describe the solution you’d like

  • Inside the repository create a new react project on project root /docs folder
  • Link the dependencies to its package.json to use the ones on the librabry node_modules, including the own flowbite-react librabry
  • Move the build scripts to the package.json for the docs project
  • Move the src/docs to the new project

Describe alternatives you’ve considered n/a

Additional context Better if we could create the docs project without CRA and using NextJS or Remix.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rluderscommented, Jun 14, 2022

@davemooreuws what I want to do with this task is something very similar to it. I also want to make it a monorepo, my main issue right now with the current structure is that we are using CRA, and we do have a lot of folders inside the src/ folder. IMHO, we need to split it into separated projects, by having, for now, the ./src storing the library things, while the ./docs being a separated project, inside the repository, that will only have the documentation.

With that we could simplify the package.json for both projects as well to remove the CRA to the library itself, removing the “magic layer” that it introduces to the build.

But yep, you got the idea. I’m not sure how it is going to be with the storybook yet, 'cause I consider having the stories close to the components as a HUGE benefit, and I think that I already discussed it with someone about it, based on this post. But of course, we could still have a ./storybook at the project root to hold some .mdx files. But this is another task. Right now, docs! 😄

1reaction
davemooreuwscommented, Jun 14, 2022

@rluders we could look at introducing https://turborepo.org/ into the mix.

Then we would have the docs and storybook under apps and the library under packages within a monorepo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Move files from one repository to another, preserving git history
Step 4: Pull files and history from this branch (containing only the directory you want to move) into repository B. Step 5: Remove...
Read more >
Splitting a subfolder out into a new repository - GitHub Docs
Open Terminal . Change the current working directory to the location where you want to create your new repository. Clone the repository that...
Read more >
How to move some files from one git repo to another (not a ...
For single file move only: go through what's left and remove everything except the desired file. (You may need to delete files you...
Read more >
Moving Files from one Git Repository to Another, Preserving ...
Then simply pull from this branch (containing only the directory you want to move) into repository B. The pull copies both files and...
Read more >
Git: Moving a sub-directory to a new repo with history - YouTube
I needed to move a directory within a git repo to its own repo, but I wanted to preserve commit history. Using a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found