mirror of
https://github.com/jbranchaud/til
synced 2026-01-07 00:58:02 +00:00
Add Globally Install A Package With Yarn as a javascript til
This commit is contained in:
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
|||||||
For a steady stream of TILs from a variety of rocketeers, checkout
|
For a steady stream of TILs from a variety of rocketeers, checkout
|
||||||
[til.hashrocket.com](https://til.hashrocket.com/).
|
[til.hashrocket.com](https://til.hashrocket.com/).
|
||||||
|
|
||||||
_540 TILs and counting..._
|
_541 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -204,6 +204,7 @@ _540 TILs and counting..._
|
|||||||
- [Create An Array Containing 1 To N](javascript/create-an-array-containing-1-to-n.md)
|
- [Create An Array Containing 1 To N](javascript/create-an-array-containing-1-to-n.md)
|
||||||
- [Enable ES7 Transforms With react-rails](javascript/enable-es7-transforms-with-react-rails.md)
|
- [Enable ES7 Transforms With react-rails](javascript/enable-es7-transforms-with-react-rails.md)
|
||||||
- [Expand Emojis With The Spread Operator](javascript/expand-emojis-with-the-spread-operator.md)
|
- [Expand Emojis With The Spread Operator](javascript/expand-emojis-with-the-spread-operator.md)
|
||||||
|
- [Globally Install A Package With Yarn](javascript/globally-install-a-package-with-yarn.md)
|
||||||
- [Immutable Remove With The Spread Operator](javascript/immutable-remove-with-the-spread-operator.md)
|
- [Immutable Remove With The Spread Operator](javascript/immutable-remove-with-the-spread-operator.md)
|
||||||
- [Numbers Are Empty](javascript/numbers-are-empty.md)
|
- [Numbers Are Empty](javascript/numbers-are-empty.md)
|
||||||
- [Object Initialization With Shorthand Property Names](javascript/object-initialization-with-shorthand-property-names.md)
|
- [Object Initialization With Shorthand Property Names](javascript/object-initialization-with-shorthand-property-names.md)
|
||||||
|
|||||||
18
javascript/globally-install-a-package-with-yarn.md
Normal file
18
javascript/globally-install-a-package-with-yarn.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Globally Install A Package With Yarn
|
||||||
|
|
||||||
|
I'm used to using the `-g` flag with `npm` to install packages globally.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm install -g create-react-app
|
||||||
|
```
|
||||||
|
|
||||||
|
But how do I achieve the same thing with [`yarn`](https://yarnpkg.com/en/)?
|
||||||
|
|
||||||
|
By using the `global` command prefix, I can do a number of `yarn` tasks
|
||||||
|
globally, including adding a package.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ yarn global add create-react-app
|
||||||
|
```
|
||||||
|
|
||||||
|
[source](https://yarnpkg.com/lang/en/docs/cli/global/)
|
||||||
Reference in New Issue
Block a user