node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



A node package that executes Handlebars precompiler commands whenever a change happens in the watched directories.

There are a couple of node packages that does the same thing and even more, but I noticed that most of them are implementing there own precompiler for Handlebars. I just wanted to use the existing Handlebars precompiler and trigger it by watching a folder structure.


The package may be installed via npm using the npm install -g handlebars-watch command.


  -c, --config     Path to Config File   [string]


handlebars-watch -c ../build/hbw-config.json

Inside a node file

var hbw = require('handlebars-watch');

The config file is a simple json array and is required for this package. Each item in the array is a combination of a path and command. The path is the location of the folder to watch and command is the command to execute when the watch is triggered.


  "path": "templates/pages/",
  "command": "handlebars templates/pages>pageTemplates.js -a -e html"
  "path": "templates/partials/",
  "command": "handlebars templates/partials>partialTemplates.js -a -p -e html"
  1. The path should be relative to the location of the config file.
  2. Install Handlebars as a global package.

Issues Or Contributions

  • If you have an idea to improve the package, let me know. It will help the community.
  • If this helped you, spread the word and don't forget to star the repo.
  • Post issues in the github issue tracker.
  • My email is
  • Pull requests are welcome.
  • LinkedIn Pofile
  • Stack Overflow Pofile