Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
102 replies
fotoflo

Moving a repo inside a repo!

Hi guys,
I have two projects that i want to merge:
1. A nodejs scraper
2. A Next project

They both share a single prisma schema...
- The node js scraper was a bit legacy but has been rewritten with prisma!
- the next project plans to read data from the scraper, so wants to share a single prisma instance

I was planing to do this:
1. Merge the prisma schema (done)
- db pull from the scraper into the next project, resulting in a schma with both users, and the data they want access to, yay!

2. Merge the files (structure outline below)
I managed to do this successfully (the scraper and the next project run) , but it behaves like /scraper is is in the .gitignore of /nextProject

- is this the reccomended way to do it?
- can i have just one .git, tsconfig, env and package.json or will everything get messed up (dependancies get heavy, etc)

Thank you!

/nextProject
   .git
   .env
   .tsconfig
   package.json
   prisma.schema
   /src. - all the usual stuff
   /scraper
         .git
         .env
        .tsconfig
        .git
        package.json
        // NO PRISMA SCHEMA
Was this page helpful?