Skip to content

Commit e2f1359

Browse files
fix: add zenn-cli command sample
1 parent 71065b9 commit e2f1359

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/guides/zenn-editor/zenn-cli.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ zenn-cli は記事や本のテンプレートを作成するコマンドツー
2424

2525
`yarn dev` を実行することでクライアントとサーバーが起動します。クライアントは [vite](https://vitejs.dev/) でホスティングされ、サーバーはExpressサーバーを [nodemon](https://nodemon.io/) で監視することで、ホットリロードを実現します。
2626

27+
### その他のコマンドを開発環境で動かす
28+
29+
`yarn build` でビルドを実行したうえで、`yarn zenn **` コマンドを実行します。
30+
31+
```shell
32+
$ yarn build
33+
$ yarn zenn # = npx zenn
34+
$ yarn zenn preview # = npx zenn preview (.mdの変更に伴うホットリロードも有効になります)
35+
$ yarn zenn new:article --slug foo-bar-baz-qux # = npx zenn new:article --slug foo-bar-baz-qux
36+
$ yarn zenn new:book --slug foo-bar-baz-qux # = npx zenn new:book --slug foo-bar-baz-qux
37+
$ yarn zenn --help # = npx zenn --help
38+
```
39+
2740
## ビルド
2841

2942
`yarn build``./dist` に生成されたファイルをnpmのリリース時に含めるようにします。( `package.json``files` に指定)

0 commit comments

Comments
 (0)