I’m working on building myself a portfolio site. I’m publishing my site from a public repository that will eventually contain several submodules (it only has one right now). Currently, I’m building my site by using npm run
.
This works great for one repository. The issue is that I have each of the submodules set up as their own npm packages. Each submodule has an individual package.json
, package-lock.json
, and node_modules/
.
In a perfect world, I’d like to set my site up so that each submodule builds individually. I thought about setting up a script that’d look through every directory (recursively), find any with a package.json
, and run that directory’s npm script. I ran into a wall when I realized that the compiler would have to checkout into those directories. Since Netlify doesn’t use bash, I’m not sure how I’d do that.
I realize that I could just have my main repository require every submodule’s dependencies as well, but that’d be a major pain. I work in each repository individually, and then I update the submodules in the main one.
If anyone knows a way to do this or has any advice, it’d be much appreciated!