Skip to content

How to specify which order should run the build task of package #1347

Closed Answered by ThibautMarechal
tgmarinho asked this question in Help
Discussion options

You must be logged in to vote

You have 2 options:

1) Make that link visible in each package dependencies

(C depends on B and A depdends on C)

{
  "name": "a",
  "dependencies": {
    "c": "*"
  },
  "scripts": {
    "build": "echo a"
  }
}
{
  "name": "b",
  "scripts": {
    "build": "echo b"
  }
}
{
  "name": "c",
  "dependencies": {
    "b": "*"
  },
  "scripts": {
    "build": "echo c"
  }
}

Then you just need to configure the pipelines with the ^ before the task's name.

{
  "$schema": "https://turborepo.org/schema.json",
  "pipeline": {
    "build": {
      "dependsOn": ["^build"]
    }
  }
}

2) Make that link visible in the turbo.json file

(no package depends on each others)

{
  "name": "a",
  "scripts": {
  …

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@Neo-Ciber94
Comment options

Answer selected by mehulkar
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@58bits
Comment options

@arkmech
Comment options

@58bits
Comment options

@anthonyshew
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
6 participants