Create a new package.
$> yarn init
Create a new package in the local directory :
Create a new private package in the local directory :
yarn init -p
Create a new package and store the Yarn release inside :
yarn init -i=latest
Create a new private package and defines it as a workspace root :
yarn init -w
|Initialize a private package
|Initialize a workspace root with a
|Initialize a package with a specific bundle that will be locked in the project
|Initialize a package with the given name
This command will setup a new package in your local directory.
-w,--workspace options are set, the package will be
private by default.
-w,--workspace option is set, the package will be configured to accept
a set of workspaces in the
-i,--install option is given a value, Yarn will first download it using
yarn set version and only then forward the init call to the newly downloaded
bundle. Without arguments, the downloaded bundle will be
The initial settings of the manifest can be changed by using the
initFields configuration values. Additionally, Yarn will generate an
EditorConfig file whose rules can be altered via
initEditorConfig, and will
initialize a Git repository in the current directory.