CLI
CLIコマンドを使用してテーマを生成する方法を学ぶ。
使い方
下記のコマンドを実行する前に、
@yamada-ui/cliをインストールしてinitコマンドを実行する必要があります。詳しくは、こちらをご覧ください。テーマを生成する
themeコマンドを実行すると、指定されたパスにテーマを生成します。
pnpm yamada-cli theme
npm yamada-cli theme
yarn yamada-cli theme
bun yamada-cli theme
パスが指定されない場合は、
./themeにテーマが生成されます。Usage: pnpm yamada-cli theme [options] [path]
generate theme to your project
Arguments:
path path to the theme directory
Options:
--cwd <path> current working directory
-c, --config <path> path to the config file (default: "ui.json")
-o, --overwrite overwrite existing directory. (default: false)
-j, --js use js instead of ts
-f, --format format the output files.
-l, --lint lint the output files.
-h, --help display help for command
差分を確認する
diffコマンドを実行すると、テーマのローカルとリモートの差分を確認できます。
pnpm yamada-cli diff theme
npm yamada-cli diff theme
yarn yamada-cli diff theme
bun yamada-cli diff theme
Usage: pnpm yamada-cli diff [options] [component]
check for updates against the registry
Arguments:
component component to check
Options:
--cwd <path> current working directory
-c, --config <path> path to the config file (default: "ui.json")
-s, --sequential run tasks sequentially. (default: false)
-d, --detail show detailed changes (default: false)
-h, --help display help for command
テーマを更新する
updateコマンドを実行すると、テーマを更新します。
pnpm yamada-cli update theme
npm yamada-cli update theme
yarn yamada-cli update theme
bun yamada-cli update theme
Usage: pnpm yamada-cli update [options] [components...]
update components in your project
Arguments:
components components to update
Options:
--cwd <path> current working directory
-c, --config <path> path to the config file (default: "ui.json")
-i, --install install dependencies (default: false)
-s, --sequential run tasks sequentially. (default: false)
-f, --format format the output files.
-l, --lint lint the output files.
-h, --help display help for command
型定義を更新する
tokensコマンドを実行すると、カスタマイズしたテーマの型定義を更新できます。
この型定義は、Style Propsなどで使用されます。
pnpm yamada-cli tokens
npm yamada-cli tokens
yarn yamada-cli tokens
bun yamada-cli tokens
パスが指定されない場合は、コンフィグの
theme.pathを参照します。Usage: pnpm yamada-cli tokens [options] [path]
generate theme typings
Arguments:
path path to the theme file
Options:
--cwd <path> current working directory
-c, --config <path> path to the config file (default: "ui.json")
-o, --out <path> output path
-f, --format format the output file
-l, --lint lint the output file
-h, --help display help for command