Skip to content

Switch to Lerna#21

Closed
ericclemmons wants to merge 3 commits into
masterfrom
21-lerna
Closed

Switch to Lerna#21
ericclemmons wants to merge 3 commits into
masterfrom
21-lerna

Conversation

@ericclemmons
Copy link
Copy Markdown
Owner

This would resolve #14

@ericclemmons
Copy link
Copy Markdown
Owner Author

https://github.com/lerna/lerna#getting-started

  • npx lerna init
diff --git a/lerna.json b/lerna.json
new file mode 100644
index 0000000..4000003
--- /dev/null
+++ b/lerna.json
@@ -0,0 +1,8 @@
+{
+  "npmClient": "yarn",
+  "packages": [
+    "packages/*"
+  ],
+  "version": "1.2.0",
+  "useWorkspaces": true
+}
diff --git a/package.json b/package.json
index e1c7f43..e705ccb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,7 @@
 {
   "private": true,
   "scripts": {
+    "install": "lerna bootstrap",
     "postinstall": "yarn workspace polydev link",
     "dev": "DEBUG=polydev polydev -r ts-node/register",
     "dev:server": "DEBUG=polydev node server",
@@ -10,5 +11,10 @@
     "start": "NODE_ENV=production polydev",
     "start:server": "NODE_ENV=production node server"
   },
-  "workspaces": ["packages/*"]
+  "workspaces": [
+    "packages/*"
+  ],
+  "devDependencies": {
+    "lerna": "^3.10.7"
+  }
 }

@ericclemmons
Copy link
Copy Markdown
Owner Author

Interesting enough, lerna bootstrap skips recursive execution of yarn install 👍

@ericclemmons
Copy link
Copy Markdown
Owner Author

Adding yarn clean, because I like lerna to be largely an implementation detail.

@ericclemmons
Copy link
Copy Markdown
Owner Author

ericclemmons commented Feb 3, 2019

Trying out https://github.com/lerna/lerna-changelog now:

yarn add lerna-changelog --dev -W

@ericclemmons
Copy link
Copy Markdown
Owner Author

Getting errors with git describe because I have no tags yet.

https://stackoverflow.com/questions/4404172/how-to-tag-an-older-commit-in-git

@ericclemmons ericclemmons added the enhancement New feature or request label Feb 3, 2019
@ericclemmons
Copy link
Copy Markdown
Owner Author

Babel is good as an example

https://github.com/babel/babel/blob/master/lerna.json

@ericclemmons
Copy link
Copy Markdown
Owner Author

I give up. https://changebot.app/preview/ericclemmons/polydev is much better.

All that's missing is a way of generating it from the CLI or cURLing it.

@ericclemmons
Copy link
Copy Markdown
Owner Author

But still, publishing isn't working how I want it.

@ericclemmons ericclemmons mentioned this pull request Mar 10, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

yarn release doesn't work

1 participant