Created
September 17, 2019 07:33
-
-
Save bogas04/874731db80967c040209fea396bf7804 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Install lerna globally | |
npm i -g lerna | |
# Change directory to your work folder | |
cd ~/Work | |
# Make the folder you want to keep your monorepo in | |
mkdir portal-web | |
# Change directory to monorepo folder | |
cd portal-web | |
# Initialize lerna (it will handle `git init`) | |
lerna init | |
# Commit the changes | |
git add . && git commit -m "Initial commit" | |
# Import other packages (https://github.com/lerna/lerna/tree/master/commands/import) | |
lerna import ~/Work/portal-mweb | |
# That's pretty much it! | |
# Fun fact: If you want to rename your package, simply rename the folder before importing. | |
# Fun fact 2: You might need to flatten out the commits in most cases (https://github.com/lerna/lerna/tree/master/commands/import#--flatten) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment