docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.47k stars 5.67k forks source link

chore: migrate from lerna bootstrap to npm workspaces #2094

Closed JamesHenry closed 1 year ago

JamesHenry commented 1 year ago

Summary

Hi Docsify Folks 👋

I'm James, you might possibly know me already from having created https://github.com/typescript-eslint/typescript-eslint or my work on some other popular open-source tools over the years such as ESLint, Prettier and Babel. Right now I've got my Lerna maintainer hat on 🐉

In lerna v7 we removed lerna boostrap and other legacy package management commands by default. You can read about the full context if you are interested here: https://lerna.js.org/docs/legacy-package-management

This PR updates to latest lerna v7 and migrates the codebase to use npm workspaces instead of lerna boostrap.

You no longer need to run npm install in nested directories in CI, as npm workspaces handles everything natively from the root.

Please let me know if you have questions!

For any code change,

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

Related issue, if any:

You could close #1216 and #2092 in favor of this PR

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2023 9:00pm
codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 20896cfc006934a2504113bbb527fe789afb887f:

Sandbox Source
docsify-template Configuration
JamesHenry commented 1 year ago

Thanks a lot for reviewing my PR folks!

I thought it might be easier to respond via a video.

I am sorry for the poor quality, Github forced me to make the file under 10MB, so I had to compress it quite a bit.

https://github.com/docsifyjs/docsify/assets/900523/9c9d46a9-d384-4d72-9d8a-e2cc303d12bd

Please could you grant permission for the CI workflow to run?

JamesHenry commented 1 year ago

@sy-records Thanks! Looks like CI is green which is great. So to finish this off you want me to update the README to remove the instructions for running npm run build:ssr and just have it be:

npm install && npm run dev

Is that right?

sy-records commented 1 year ago

yep

JamesHenry commented 1 year ago

@sy-records Thanks, done! You'll need to approve the CI run again please

JamesHenry commented 1 year ago

Looks like we're all good now!

trusktr commented 1 year ago

This is awesome. Thanks @JamesHenry!

trusktr commented 1 year ago

@JamesHenry Quick question: we gitignored the package-lock.json in packages/docsify-server-renderer. What are your thoughts on that?

JamesHenry commented 1 year ago

@trusktr Yeah that makes sense to protect against folks accidentally recreating it and confusing things!