Created
May 4, 2021 20:04
-
-
Save kruzyk/a326f9a2a96623a6f34e7c3d0a0a46a5 to your computer and use it in GitHub Desktop.
Revisions
-
DanyloMoraes revised this gist
Jun 6, 2020 . 1 changed file with 73 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -68,4 +68,76 @@ alias yo="yarn outdated" $ yarn version $ yarn version --major $ yarn version --minor $ yarn version --patch ======================= NEW REVISION # YARN [yarnpkg.com](https://yarnpkg.com/) ## yarn init Create a new package ```bash $ yarn init $ yarn init -y ``` ## yarn add Add dependencies to the project ```bash $ yarn add <packageName> $ yarn add -D <packageName> $ yarn add -O <packageName> $ yarn add -P <packageName> $ yarn add <packageName>@<version> ``` ## yarn cache clean Remove the shared cache files ```bash $ yarn cache clean $ yarn cache clean --mirror $ yarn cache clean --all ``` ## yarn dlx Run a package in a temporary environment ```bash $ yarn dlx <packageTemporary> ``` ## yarn install Install the project dependencies ```bash $ yarn install ``` ## yarn link Connect the local project to another one ```bash $ yarn link <destination> $ yarn link ~/jquery-folder ``` ## yarn run Run a script defined in the package.json ```bash $ yarn run <scriptName> ``` ## yarn up Upgrade dependencies across the project ```bash $ yarn up $ yarn up <packageName> ``` -
DanyloMoraes revised this gist
May 14, 2020 . No changes.There are no files selected for viewing
-
DanyloMoraes revised this gist
May 14, 2020 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,3 @@ ### Basic Commands ```sh -
DanyloMoraes revised this gist
Jun 25, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # YARN [yarnpkg.com](https://yarnpkg.com/en/) ### Basic Commands ```sh -
DanyloMoraes created this gist
Jun 15, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,73 @@ # YARN ### Basic Commands ```sh alias y="yarn" alias yi="yarn init -y" ``` ### Install And Remove Packages ```sh alias ya="yarn add" alias yr="yarn remove" ``` ### Install Packages In Your *devDependencies* ```sh alias yad="yarn add -D" ``` ### Install And Remove Packages Globally ```sh alias yga="yarn global add" alias ygr="yarn global remove" ``` ### Upgrades Packages To Their Latest Version ```sh alias yu="yarn upgrade" alias ygu="yarn global upgrade" ``` ### Clear The Global Cache ```sh alias ycc="yarn cache clean" ``` ### Runs A Defined Package Script ```sh alias yrun="yarn run" ``` ### List Installed Packages ```sh alias yl="yarn list --depth=0" alias ygl="yarn global list --depth=0" ``` ### Checks For Outdated Packages ```sh alias yo="yarn outdated" ``` ### Updates The Package Version *To change the prefix of the git tag you can use `version-tag-prefix`*. $ yarn config set version-tag-prefix "v" *Using the `yarn version` command you can update the version of your package via the command line*. $ yarn version $ yarn version --major $ yarn version --minor $ yarn version --patch