Last active
November 26, 2019 10:56
-
-
Save fedecarg/65410cd7aae1768b048dc48d652b61f5 to your computer and use it in GitHub Desktop.
Lerna: validate only the packages that have changed since the last tagged release
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lerna_lint() { | |
npx lerna exec $(for package_dir in `npx lerna changed -p`; do echo -n " --scope $(basename ${package_dir})"; done) -- yarn lint | |
} | |
function lerna_test() { | |
npx lerna exec $(for package_dir in `npx lerna changed -p`; do echo -n " --scope $(basename ${package_dir})"; done) -- yarn test | |
} | |
function validate() { | |
lerna_lint | |
lerna_test | |
} | |
# ------------------------------------------------------------ | |
# Aliases | |
# ------------------------------------------------------------ | |
alias lerna_validate=lerna_validate | |
alias lerna_lint=lerna_lint | |
alias lerna_test=lerna_test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment