Last active
September 2, 2021 19:16
-
-
Save bbrt3/08f3e44041569d0d1853d096a3d8bc38 to your computer and use it in GitHub Desktop.
yarn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add @angular/core | |
is how we would add dependency to angular/core to our project. | |
It will update package.json and add dependency (it always gives latest version, like npm install --save !) | |
yarn add protrator --dev / --peer / --optional | |
is how we would add dependency to protractor to dev/peer/optionalDependencies part of package.json | |
yarn global add @angular/cli | |
is how we would add global dependency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn cache clean | |
will clean your local cached dependencies to make sure you get correct version when installing it again | |
yarn cache ls | |
will display what is currently held in our cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn check | |
checks if dependencies can be upgraded | |
yarn check --integrity | |
checks if dependencies are in sync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn clean | |
deletes every dependency of project that was downloaded and gives us info about deleted data. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn info @angular/cli | |
will display info about dependency @angular/cli | |
yarn info @angular/cli versions | |
will display all available versions for @angular/cli |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn init | |
initializes the package.json file in directory that we currently are. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn global ls | |
will list our global dependencies | |
yarn list | |
will list our project dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn remove @angular/core | |
is how we would remove dependency that we no longer need in our project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn run scriptName | |
is how we would launch a script called scriptName located in our package.json | |
yarn scriptName would work exactly the same! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add @angular/[email protected] | |
is how we would change the version of @angular/core dependency in our project and set it to 4.0.0. | |
yarn upgrade @angular/core | |
is how we would upgrade @angular/core dependency in our project and set it to latest version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment