From 81a9c4fedd9b49d97ac512aa7b0fbb0fddf25c93 Mon Sep 17 00:00:00 2001 From: vkolmakov Date: Sun, 16 Oct 2016 17:24:40 -0500 Subject: [PATCH 1/3] yarn: add page --- pages/common/yarn.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pages/common/yarn.md diff --git a/pages/common/yarn.md b/pages/common/yarn.md new file mode 100644 index 0000000000..0cdcef2391 --- /dev/null +++ b/pages/common/yarn.md @@ -0,0 +1,35 @@ +# yarn + +> JavaScript and Node.js package manager alternative. + +- Install a module globally: + +`yarn global add {{module_name}}` + +- Install all dependencies referenced in the package.json: + +`yarn` + +- Install a module and save it as a dependency to the package.json: + +`yarn add {{module_name}}@{{version}}` + +- Install a module and save it as a dev dependency to the package.json: + +`yarn add {{module_name}}@{{version}} --dev` + +- Uninstall a module and remove it from the package.json: + +`yarn remove {{module_name}}` + +- List a tree of installed modules: + +`yarn ls` + +- Interactively create a package.json file: + +`yarn init` + +- Identify why the module is installed and list other modules that depend on it: + +`yarn why {{module_name}}` From 165e1ded0b52407da328c45b140b24dd34681607 Mon Sep 17 00:00:00 2001 From: vkolmakov Date: Sun, 16 Oct 2016 18:46:48 -0500 Subject: [PATCH 2/3] Merge add and add-dev and remove ls --- pages/common/yarn.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pages/common/yarn.md b/pages/common/yarn.md index 0cdcef2391..6f73a699c8 100644 --- a/pages/common/yarn.md +++ b/pages/common/yarn.md @@ -10,22 +10,14 @@ `yarn` -- Install a module and save it as a dependency to the package.json: +- Install a module and save it as a dependency to the package.json. Add --dev to save as a dev dependency: `yarn add {{module_name}}@{{version}}` -- Install a module and save it as a dev dependency to the package.json: - -`yarn add {{module_name}}@{{version}} --dev` - - Uninstall a module and remove it from the package.json: `yarn remove {{module_name}}` -- List a tree of installed modules: - -`yarn ls` - - Interactively create a package.json file: `yarn init` From 7b3cf933c0a62363e6e0ec7d6c2a09c917bc2391 Mon Sep 17 00:00:00 2001 From: vkolmakov Date: Sun, 16 Oct 2016 22:10:01 -0500 Subject: [PATCH 3/3] Rephrase why command description and minor fixes --- pages/common/yarn.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/common/yarn.md b/pages/common/yarn.md index 6f73a699c8..aef8c0cb5b 100644 --- a/pages/common/yarn.md +++ b/pages/common/yarn.md @@ -6,15 +6,15 @@ `yarn global add {{module_name}}` -- Install all dependencies referenced in the package.json: +- Install all dependencies referenced in the package.json file: `yarn` -- Install a module and save it as a dependency to the package.json. Add --dev to save as a dev dependency: +- Install a module and save it as a dependency to the package.json file (add --dev to save as a dev dependency): `yarn add {{module_name}}@{{version}}` -- Uninstall a module and remove it from the package.json: +- Uninstall a module and remove it from the package.json file: `yarn remove {{module_name}}` @@ -22,6 +22,6 @@ `yarn init` -- Identify why the module is installed and list other modules that depend on it: +- Identify whether a module is a dependency and list other modules that depend upon it: `yarn why {{module_name}}`