Skip to content

Pre-compiling a directory is broken as of 1.0.10 #461

Closed
@dustinboston

Description

@dustinboston

With the 1.0.6-2 handlebars package I was able to do this:

handlebars ../templates/*.handlebars -f ../templates/templates.js -k include -m

And all the templates in the templates directory would get built and pushed into templates.js.

But as of at least 1.0.10 I get this:

/usr/local/lib/node_modules/handlebars/lib/handlebars/compiler/compiler.js:1240
    throw new Handlebars.Exception("You must pass a string or Handlebars AST t
          ^
Error: You must pass a string or Handlebars AST to Handlebars.precompile. You passed 
    at new Error (unknown source)
    at Error.Handlebars.Exception (/usr/local/lib/node_modules/handlebars/lib/handlebars/utils.js:8:41)
    at Object.exports.attach.Handlebars.precompile (/usr/local/lib/node_modules/handlebars/lib/handlebars/compiler/compiler.js:1240:11)
    at processTemplate (/usr/local/lib/node_modules/handlebars/bin/handlebars:163:78)
    at /usr/local/lib/node_modules/handlebars/bin/handlebars:169:3
    at Array.forEach (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/handlebars/bin/handlebars:168:8)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)

Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions