Context
We are working through a proposal on what a Roku application monorepo could look like, built on rokucommunity tooling, and using Rush as the build orchestrator / monorepo tooling. Rush is built around TypeScript, and since many of the rokucommunity tools have similar goals to the TS ecosystem, a lot of stuff "just works".
We rely on PNPM to install packages and provide workspaces, which is how a Roku app would "depend on" a Roku library in the same repo (using the workspace:* dependency notation). I've prepared an example commit to show how this looks, using bsconfig file mapping and just swapping from path references to a workspace reference.
We would like to take this a step further: the above approach works great, but every time you add library x to your dependency list, you need to go and manually add multiple lines of x file mappings to your bsconfig. It looks like ropm would be one way to remove that requirement.
The problem
The issue is that ropm doesn't work quite like we'd want it to in this case, and I'm interested in options.
At first, I was thinking I just needed to change ropm to symlink instead of copying:
src/source/roku_modules/foo/ -> ../node_modules/foo/source/
src/components/roku_modules/foo/ -> ../node_modules/foo/components/
src/images/roku_modules/foo/ -> ../node_modules/foo/images/
Then I realized this doesn't quite work because an ropm install isn't just an ropm install, it's actually modifying files as it copies. So it's not really something we could add to the "rush install" step in our repo. Ideally, these files would never be in the source folders, and would get written into the destination at build time just like the rest of the bsconfig-mapped files.
I'm opening up this ticket without having a clear picture of exactly what I want yet -- maybe a better idea on how people are using the tool? I suppose we could make it part of the build script, e.g.:
{
"scripts": {
"build": "ropm install && bsc"
}
}
This seems a bit messy because you are overwriting a bunch of files in src/ every time you run, but if all of those files are gitignore'd, maybe that's OK. It would give us the primary goal: we could depend on library foo, and then those files would automatically be available in the usual roku_modules/ folders without any extra file mappings.
Anyone toyed around with similar ideas?
Context
We are working through a proposal on what a Roku application monorepo could look like, built on rokucommunity tooling, and using Rush as the build orchestrator / monorepo tooling. Rush is built around TypeScript, and since many of the rokucommunity tools have similar goals to the TS ecosystem, a lot of stuff "just works".
We rely on PNPM to install packages and provide workspaces, which is how a Roku app would "depend on" a Roku library in the same repo (using the
workspace:*dependency notation). I've prepared an example commit to show how this looks, using bsconfig file mapping and just swapping from path references to a workspace reference.We would like to take this a step further: the above approach works great, but every time you add library
xto your dependency list, you need to go and manually add multiple lines ofxfile mappings to your bsconfig. It looks likeropmwould be one way to remove that requirement.The problem
The issue is that
ropmdoesn't work quite like we'd want it to in this case, and I'm interested in options.At first, I was thinking I just needed to change ropm to symlink instead of copying:
Then I realized this doesn't quite work because an ropm install isn't just an ropm install, it's actually modifying files as it copies. So it's not really something we could add to the "rush install" step in our repo. Ideally, these files would never be in the source folders, and would get written into the destination at build time just like the rest of the bsconfig-mapped files.
I'm opening up this ticket without having a clear picture of exactly what I want yet -- maybe a better idea on how people are using the tool? I suppose we could make it part of the build script, e.g.:
{ "scripts": { "build": "ropm install && bsc" } }This seems a bit messy because you are overwriting a bunch of files in
src/every time you run, but if all of those files are gitignore'd, maybe that's OK. It would give us the primary goal: we could depend on libraryfoo, and then those files would automatically be available in the usualroku_modules/folders without any extra file mappings.Anyone toyed around with similar ideas?