1
1

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 1 year has passed since last update.

voltaのコマンドまとめ【プロジェクトをUpdateしてく!-➂】

Last updated at Posted at 2023-05-22

今回行った一連の流れ

➀nodistをvoltaへ変更
➁npm-check-updatesを導入
➂gulp-sassをgulp-dart-sassへ変更 ←今回ここをpick up☆
➃bootstrapを使用したプロジェクトの場合、bootstrapのアップデート

経緯

新しいプロジェクトを任されることに。そのプロジェクトをクローンしたらnpx update-browserslist-db@latestのコマンドがnpx gulpで常にでてきてしまうことに気づき、さらに元々プロジェクトを担当していた人と開発環境が違ったためgulpファイルの追記と修正が必要になった。

以上のことから、「一連の流れ」を行うことになった。
上記の項目ごとに備忘録として記事を書くことにした。

前提

  • windows
  • nodistをパッケージマネージャーとして使用
  • bootstrapバージョン4を使用
     
    (※voltaはMacでもOKです!)
     
      
     
     

【nodistをvoltaへ変更】

※この記事は続き記事です。
 項目ごとに記事わけしているので単体でも活用していただけます。

《目次》

<voltaのコマンドまとめ>===============

現在インストールされているvoltaの詳細
volta
node最新バージョンをインストール
volta install node
node指定のバージョンをインストール
volta install node@バージョン

<例>volta install node@16.20
 

各プロジェクトごとにpinする
volta pin node@バージョン
現在インストールされてるnodeのバージョンとpin, defaultがわかる
volta list node

<その他>===============

voltaでのnodeパッケージの導入はグローバルは非推奨。

<余談>
Voltaに変えた理由としては、もともと使っていたnodistではできなかったプロジェクトごとのバージョン管理が可能になるため。複数のプロジェクトを担当しているとそれぞれのnodeのバージョンなどがバラバラの場合編集のたびにバージョン変更を強いられていたのでVoltaの仕様は助かる。

 
 
 
 
 
 
 

◆◆次回はnpm-check-updateを導入◆◆

次回

「npm-check-updatesを導入【プロジェクトをUpdateしてく!-➃】」

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?