#!/usr/bin/env
MAIN_PKG=@mycompany/mypackageA
# With lerna include-filtered-dependencies the output included the main package dependencies and the main package it self.
# We want to remove the main packgae to build only the dependencies.
SCOPES_LIST=$(lerna list --json --scope $MAIN_PKG --include-filtered-dependencies | jq '[map(select(.name!="$MAIN_PKG")) | .[] | "--scope " + .name] | reduce .[] as $item (""; . + $item + " ")')
lerna run build $SCOPES_LIST
```
Last active
December 24, 2019 16:15
-
-
Save elpddev/879ce27844b4c5ce4c5ee353bc803e29 to your computer and use it in GitHub Desktop.
build related packages excluding the main package in lerna
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment