Turborepo including PHP backend app? #1900
-
|
Does Turborepo support running PHP apps from the /apps/ folder? I appreciate that Turborepo's features are JS oriented, but would anything break if we put a backend app or CMS in there? Disclaimer: I'm just evaluating Turborepo at this point and haven't actively used it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
There is no restriction on the type of code you put in a monorepo that runs Turborepo. However, if you want Turborepo to do anything in that PHP codebase, you need two things:
For example, if your repo looks like this: If you're generally using {
// <rest of package.json omitted>
"workspaces": [ "apps/*" ]
}and {
"name": "php-app",
"scripts": {
"build": "composer start" // I haven't worked too much with PHP , so this is just a guess
}
}and Hope that helps! |
Beta Was this translation helpful? Give feedback.
There is no restriction on the type of code you put in a monorepo that runs Turborepo. However, if you want Turborepo to do anything in that PHP codebase, you need two things:
scriptskey with the tasks you want to run.For example, if your repo looks like this:
If you're generally using
npm, the root package.json will declare workspace:{ // <rest of package.json omitted> "workspaces": [ "apps/*" ] }and
apps/php-app/package.jsonwill look like{…