handlebars.js を使用して、単一ページ アプリのクライアント側テンプレートを (node.js サーバー側で Jade を使用して) レンダリングしています。
サーバー側でハンドルバー テンプレートをプリコンパイルし、それらを 1 つの JS ファイルとしてバンドルしてクライアントに送信したいと考えています。
現在、私は次handlebarsのようにテンプレートをコンパイルするために使用しています:
$ handlebars template1.handlebars template2.handlebars -f precompiled_templates.js
*.handlebarsディレクトリ内のすべてのファイルを読み取り、ハンドルバー コンパイラで実行できる bash スクリプトを作成したいと考えています。したがって、次のようなディレクトリがあるとします。
templates/
  temp1.handlebars
  temp2.handlebars
  temp3.handlebars
  temp4.handlebars
テンプレート ディレクトリで bash スクリプト (または 1 行のコマンド) を実行すると、基本的に次のhandlebarsコマンドが実行されます。
$ handlebars temp1.handlebars temp2.handlebars temp3.handlebars temp4.handlebars -f precompiled_templates.js
上記のように、ディレクトリ内のすべてのハンドルバーファイルをコマンドラインに取得するbashスクリプトを作成する方法を知っている人はいますか?