Lerna
Setup
yarn global add lerna
lerna init
lerna.json
{
"lerna": "2.11.0",
"packages": ["packages/*"],
"version": "0.0.0",
"npmClient": "yarn",
"useWorkspaces": true
}
package.json
{
"private": true,
"workspaces": ["packages/*"]
}
yarn
lerna bootstrap
command
run command for each packages
lerna exec yarn test # with console
lerna run test # with NO console
トップに集約しても問題なさそうなパッケージメモ
babel-core
babel-jest
babel-preset-env
eslint
関係jest
regenerator-runtime
(babel-jest が使用)
参考
One vs. many — Why we moved from multiple git repos to a monorepo and how we set it up