Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

yarn init

Create a new package.

Usage

$yarn init <initializer> ...

Examples

Create a new package in the local directory:

yarninit

Create a new private package in the local directory:

yarninit-p

Create a new package and store the Yarn release inside:

yarninit-i=latest

Create a new private package and defines it as a workspace root:

yarninit-w

Details

This command will setup a new package in your local directory.

If the-p,--private or-w,--workspace options are set, the package will beprivate by default.

If the-w,--workspace option is set, the package will be configured to accepta set of workspaces in thepackages/ directory.

If the-i,--install option is given a value, Yarn will first download it usingyarnsetversion and only then forward the init call to the newly downloadedbundle. Without arguments, the downloaded bundle will belatest.

The initial settings of the manifest can be changed by using theinitScope andinitFields configuration values. Additionally, Yarn will generate anEditorConfig file whose rules can be altered viainitEditorConfig, and willinitialize a Git repository in the current directory.

Options

DefinitionDescription

-p,--private

Initialize a private package

-w,--workspace

Initialize a workspace root with apackages/ directory

-i,--install

Initialize a package with a specific bundle that will be locked in the project

-n,--name #0

Initialize a package with the given name

[8]ページ先頭

©2009-2025 Movatter.jp