sdebaun / sparks-cyclejs

45 stars 4 forks source link

separate repos for extractable components in main project #9

Closed sdebaun closed 8 years ago

sdebaun commented 8 years ago

eg looking at the firebase driver as im about to pull it from the experimental project i have locally, i would love to be able to put that in a separate repo, yet still work on it in the sparks-cyclejs project and push changes from the same working directory. @TylorS have you done anything like this, any recommendations?

TylorS commented 8 years ago

This seems like a solid use case from npm link

You'll want to structure another project however you would prefer, but at minimum with a package.json and the source code of course. Then you run npm link from inside of that folder. Then in the sparks-cyclejs project you'll run npm link my-firebase-driver-name which will 'install' the driver inside of the projects node_modules folder.

From there you'll be able to import the driver import {makeDriver} from 'my-driver' as if it were installed from npm.

I don't believe this is 100% what you're looking for, but I believe it is pretty close. Feel free to ask for more specifics if needed.

sdebaun commented 8 years ago

how does this solution work for other people working on the repo?

TylorS commented 8 years ago

Any other developer working on it would also run the same npm link commands