Comments (2)
Dumping turbo
object, it seems to have the following shape, but not sure what is public there:
{
"paths": {
"cwd": "/Users/foo/my-project/apps/dir",
"root": "/Users/foo/my-project",
"workspace": "/Users/foo/my-project"
},
"configs": [
{
"config": {},
"turboConfigPath": "/Users/foo/my-project/turbo.json",
"workspacePath": "/Users/foo/my-project",
"isRootConfig": true
}
]
}
from turbo.
Hi, I stumbled across this feature and was also wondering about this. I did some digging and I'm just going to leave this for anyone else that is currently looking:
My turbo object dump looks like this:
{
paths: {
cwd: 'C:\\Development\\monorepo\\libs\\core',
root: 'C:\\Development\\monorepo',
workspace: 'C:\\Development\\monorepo\\libs\\core\\turbo\\generators'
},
configs: [
{
config: [Object],
turboConfigPath: 'C:\\Development\\monorepo\\turbo.json',
workspacePath: 'C:\\Development\\monorepo',
isRootConfig: true
},
{
config: [Object],
turboConfigPath: 'C:\\Development\\monorepo\\apps\\dev-storybook\\turbo.json',
workspacePath: 'C:\\Development\\monorepo\\apps\\dev-storybook',
isRootConfig: false
},
{
config: [Object],
turboConfigPath: 'C:\\Development\\monorepo\\apps\\docs\\turbo.json',
workspacePath: 'C:\\Development\\monorepo\\apps\\docs',
isRootConfig: false
}
]
}
paths:
- cwd: I assume "current workspace directory", the path of the workspace that
turbo gen
was executed in (not the actual location inside that workspace) - root: Monorepo/Project root path
- workspace: Path of the workspace that the selected generator config is in (For a generator that is in a workspace folder it was "C:\Development\monorepo\libs\core\turbo\generators", though the path ended at the project root for @moltar for some reason)
configs is an array of every config that turbo knows about.
Custom plop action functions also have access to this turbo object as a prop of the answers object.
By the way, it would be awesome if paths could list every known workspace so that you can do something in all of them or select one of them. I was originally looking at this feature to automatically generate TS types in a library workspace, based on its src/components contents.
from turbo.
Related Issues (20)
- npx create-turbo@latest installs beta/release candidate version of the dependencies HOT 1
- Wrong env var prefix for SvelteKit framework inference
- expo debugger not working if server start from root(only windows OS) HOT 11
- Add `__NIX_DARWIN_SET_ENVIRONMENT_DONE` to default pass through envs (`globalPassThroughEnv`) HOT 8
- Turbo gen hangs when used with `--root`
- Issue with Path Aliases and ESLint in Turborepo with TypeScript HOT 3
- add a new example typescript with rust HOT 3
- Error message on package.json : specify which repo workspace HOT 2
- warning: the following paths have collided (e.g. case-sensitive paths on a case-insensitive filesystem) and only one from the same colliding group is in the working tree
- Deployment of `examples/with-svelte` on Vercel fails HOT 3
- Dry run doesn't output tasks that changed for modified root workspace inputs
- Filewatcher ignore from `.gitignore` not working HOT 2
- custom remote cache WARNING failed to contact remote cache: Error making HTTP request: HTTP status client error (413 Payload Too Large) for url (...) HOT 2
- Docs: Vitest docs are both incorrect and incomplete
- Getting `ERR_UNSUPPORTED_ESM_URL_SCHEME` error when trying to build with turbo repo on Windows (GH actions)
- File watching fails due to file not found on Ubuntu 22.04 LTS
- Extremely slow with 100% CPU usage
- TMP and TEMP env variables are not passed through
- Docs: mention `--graph` when talking about the task graph
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbo.