Skip to content

Comments

feat(v2): @docusaurus/init package#1655

Merged
endiliey merged 5 commits intomasterfrom
endiliey/create-docusaurus
Jul 13, 2019
Merged

feat(v2): @docusaurus/init package#1655
endiliey merged 5 commits intomasterfrom
endiliey/create-docusaurus

Conversation

@endiliey
Copy link
Contributor

Motivation

Close #1601

  • Not a good idea for user to install whole core package just to init, so lets separate it into separate package like CRA
  • No longer silently install for ez debugging
  • Less dependencies on core

The right way to test this out as npm package is to actually release alpha.20 and try it out.

Others

  • Fix other bug on theme/Layout regarding metaimage
  • Some TS deps typing

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

At root, after installing, compile typescript and mimic running the init command

https://asciinema.org/a/vcInXTcBCChXyIexXPmIAx4HI

1  initted site

@endiliey endiliey requested a review from yangshun as a code owner July 13, 2019 16:15
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 13, 2019
@docusaurus-bot
Copy link
Contributor

@facebook facebook deleted a comment from docusaurus-bot Jul 13, 2019
@facebook facebook deleted a comment from docusaurus-bot Jul 13, 2019
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do a @docusaurus/cli package instead and move the commands there? Idk if our architecture permits that at the moment but it'll be good if we can do that.

@endiliey
Copy link
Contributor Author

Can we do a @docusaurus/cli package instead and move the commands there? Idk if our architecture permits that at the moment but it'll be good if we can do that.

I actually thought of that too but after some thought i realize that this approach has a very superior advantage: super fast and separated concern. This is also an approach used by CRA.

The thing with having CLI (which i believe can be installed globally like gatsby-cli) and being separated from core is that it can sometimes lead to subtle bugs in behavior and functionality if the version of the globally installed executable does not match the version of core.

Another thing is that if we move the init to docusaurus/cli, it means that the init templates wlll live inside that package. More installation time for all user that doesnt want to init
.
Here's what i suggest:
lets try this out first, since at least this is better than having to install whole core just to init new project.
then, lets create an issue and try to see if docusaurus/cli is worth it. im hoping to get people more experienced with cli stuff to contribute for this part

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we should remember to update the docs before releasing a new version.

@endiliey
Copy link
Contributor Author

just the src/pages and src/themes docs stuff and we should be good to go for alpha 20

oh and pls help to add to our tasklist on the CLI in case i forget. gotta sleep

@endiliey endiliey merged commit d61cc01 into master Jul 13, 2019
@endiliey endiliey deleted the endiliey/create-docusaurus branch July 13, 2019 18:06
@wgao19 wgao19 mentioned this pull request Jul 18, 2019
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docusaurus2: Error when create project

4 participants