Create a new package.
$> yarn init [-p,--private] [-w,--workspace] [-l,--latest] [-i,--install #0]
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
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
-l,--latest option is set,
--install latest will be assumed.
The following settings can be used in order to affect what the generated package.json will look like: