Precompiling Handlebars.js templates in Windows

前端 未结 3 1177
情深已故
情深已故 2021-02-02 15:37

Looking at the Handlebars.js documentation for precompilation.

The instructions are for OSX. Can this be done on Windows as well?

If so, when they say to \"insta

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-02 15:57

    1. Install Node.js for Windows from here: http://nodejs.org/download/.
    2. Run in the command prompt:

      npm install handlebars -g
      

    Now you can use the following syntax in the command prompt:

    handlebars  -f 
    

    ,where is an original template file name, and is a pre-compliled template file name.

    Example:

    handlebars person.hbr -f person.js

提交回复
热议问题