这是我的文件夹结构:
app
????templates
????templ1.hbs
????templ2.hbs
????templ3.hbs
Run Code Online (Sandbox Code Playgroud)
我想在一个templ.js文件中编译(预编译)所有templN.hbs把手模板文件,但当我尝试通过控制台进行
$ handlebars *.hbs -f templ.js
Run Code Online (Sandbox Code Playgroud)
编译因此错误而失败
(...)\AppData\Roaming\npm\node_modules\handlebars\bin\handlebars:120
throw err;
^
Error: Unable to open template file "*.hbs"
at (...)\AppData\Roaming\npm\node_modules\handlebars\dist\cjs\precompiler.js:107:25
at FSReqWrap.oncomplete (fs.js:82:15)
Run Code Online (Sandbox Code Playgroud)
怎么了?