shopify cli, themeのインストール方法 [macOS編]

shopify cli, themeをmacOSへインストールする方法をご紹介します。

Shopify | ショッピファイ

背景 brewでインストールしたく無い

Shopify公式ドキュメントInstall Shopify CLIにShopify CLIのインストール方法については記載があります。

しかし、macOSのRequirementsに以下の記載があり、私はbrew経由でNode.js, Rubyをインストールしたく無いので、本記事ではasdfで管理しているNode.jsでglobal installする方法をご紹介します。

Homebrew
Node.js 18 or higher.
Ruby
Git

Note: When you install Shopify CLI using Homebrew, Homebrew installs Node.js, Ruby, and Git for you.

事前準備 asdf, Node.js, Rubyのインストール

asdfのインストールや、asdfでNode.js, Rubyをglobal installして無い場合、事前準備としてインストールしておきます。

  1. asdfのインストール方法 [macOS編]
  2. asdfでNode.jsの複数バージョン管理
  3. asdfでRubyの複数バージョン管理

npmで@shopify/cli @shopify/themeをインストール

npm install -g @shopify/cli @shopify/theme

以上、shopify cli, themeをmacOSへインストールした現場からお送りしました。