π¦ create-docusaurus
λ°λ‘ νμ©ν μ μλ λνμ¬μ°λ£¨μ€ μ±μ μ¦μ μ€μ νλλ° λμμ΄ λλ μ€μΊν΄λ© μ νΈμ λλ€.
Usageβ
npx create-docusaurus@latest [name] [template] [rootDir]
The name
argument will be used as the site's path as well as the name
field in the created app's package.json. It can be an absolute path, or a path relative to rootDir
.
The template
argument can be one of the following:
classic
: Uses the classic template (recommended)facebook
: Uses the Facebook/Meta template, which contains some Meta-specific setup- A git repo URL (beginning with
https://
orgit@
), which can be cloned to the destination - μνλ κ³³μ 볡μ¬ν νμΌμ΄ ν¬ν¨λ CWDμ λν λ‘컬 νμΌ κ²½λ‘
The rootDir
will be used to resolve the absolute path to the site directory. κΈ°λ³Έκ°μ CWDμ
λλ€.
μ΄ λͺ λ Ήμ λͺ¨λ κΈ°λ₯μ μ¬μ©ν μ μλλ‘ λνν μμμ μ¬μ©νλ κ²μ κΆμ₯ν©λλ€.
Optionsβ
-t, --typescript
β
ν
νλ¦Ώ μΈμκ° μΈμλ μ΄λ¦μΌ λ μ¬μ©ν©λλ€. Currently, only classic
provides a TypeScript variant.
-g, --git-strategy
β
ν νλ¦Ώ μΈμκ° κΉ μ μ₯μμΌ λ μ¬μ©ν©λλ€. λ€μ μ€ νλλ₯Ό μ¬μ©ν μ μμ΅λλ€.
deep
: preserves full git historyshallow
: clones with--depth=1
copy
: does a shallow clone, but does not create a git repocustom
: enter your custom git clone command. μ λ ₯μ μν κ°μ΄λλ₯Ό μ§μν©λλ€. You can write something likegit clone --depth 10
, and we will append the repository URL and destination directory.
-p, --package-manager
β
Value should be one of npm
, yarn
, pnpm
, or bun
. λͺ
μμ μΌλ‘ κ°μ μ€μ νμ§ μμΌλ©΄ λνμ¬μ°λ£¨μ€λ λ€μ κΈ°μ€μ λ°λΌ μ²λ¦¬ν©λλ€.
- CWDμ μ΄λ―Έ μλ lockfile(μ: κΈ°μ‘΄ νλ‘μ νΈμμ μΉμ¬μ΄νΈλ₯Ό μ€μ νλ κ²½μ°)
- The command used to invoke
create-docusaurus
(e.g.npm init
,npx
,yarn create
,bunx
, etc.) - μ΄μ μ μ¬μ©ν μ μλ κ²½μ°λΌλ©΄ λνν ν둬ννΈ
-s, --skip-install
β
μ΅μ
μ μ§μ νλ©΄ λνμ¬μ°λ£¨μ€λ μ± μμ± ν μ’
μμ±μ μλμΌλ‘ μ€μΉνμ§ μμ΅λλ€. The --package-manager
option is only useful when you are actually installing dependencies.