yarn add code example
Example 1: install yarn
npm install -g yarn
Example 2: add dev dependency yarn
yarn add -D package
//or
yarn add --dev package
Example 3: install dev dependency yarn
yarn add nameOfPackage --dev
Example 4: yarn add to dev
yarn add --dev <PACKAGE_NAME>
Example 5: yarn add --save-exact
yarn add <package...> [--exact/-E]