5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

yarn global 便利じゃん

Last updated at Posted at 2017-03-22

yarn globalの存在に最近気づいた。
yarn global bin叩いたら、binのpathが出る模様。
いろいろ便利そうだったので、npm -gで管理されてるものをyarnに切り替えました。

% yarn global bin
/usr/local/Cellar/node/7.7.3/bin

zshenv設定

.zshenv
path=(
  $(yarn global bin)(N-/)
  "$HOME/.config/yarn/global/node_modules/.bin"(N-/)
  $path
)

yarn globalでインストール

% yarn global add ava csslint prettier stylus

インストール確認

いるね。OKだね。

% exec zsh
% which prettier
/usr/local/Cellar/node/7.7.3/bin/prettier

yarn globalで入れたもの確認

npm -g ls よりみやすいね。

% yarn global ls
yarn global v0.21.3
warning No license field
info "ava@0.18.2" has binaries:
   - ava
info "babel@6.23.0" has binaries:
   - babel
   - babel-node
   - babel-external-helpers
info "brfs@1.4.3" has binaries:
   - brfs
info "coffee-script@1.12.4" has binaries:
   - coffee
   - cake
info "coffeelint@1.16.0" has binaries:
   - coffeelint
info "csslint@1.0.5" has binaries:
   - csslint
info "emojipacks@0.1.1" has binaries:
   - emojipacks
info "eslint@3.18.0" has binaries:
   - eslint
info "firebase-tools@3.5.0" has binaries:
   - firebase
略
✨  Done in 5.67s.
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?