feat(v2): allow init project via npm#3729
Conversation
|
Deploy preview for docusaurus-2 ready! Built with commit bcac688 |
Strange 👀 |
|
Maybe adding it to the workspace would help? "workspaces": [
"packages/*",
"website",
"website-1.x",
"website-1.x-migrated",
"packages/docusaurus-init/templates/*"
+ "test-website",
], |
3993b6e to
8e8861e
Compare
Done it, but for some unknown reason, the E2E test still falls :( |
|
don't see the problem, maybe try to revert some parts of the code and see if it improves in any way? |
Strange, it looks like errors with types, but why didn't they show up before? Changes to this PR make nothing significant. |
|
I didn't realize right away that using npm in an E2E test for Yarn v2 was a really bad idea. Thus, I refactor release script, and now in order to initialize the project via npm, need to run the command |
|
What is this -n option? |
|
It's just short for npm, in any case, this option is needed as a last resort. |
Motivation
When executing the release script during testing of #3727, I encountered that using yarn I cannot install all the packages. After some investigation, I realized that there is no such problem with npm, so I think this setting will be useful.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
packages/docusaurus-initnode packages/docusaurus-init/bin/index.js init website-with-npm classic --use-npmRelated PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)