C implementation of handlebars.js
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
build
cmake
doc
m4
spec
src
tests
.appveyor.bat
.appveyor.yml
.editorconfig
.gitattributes
.gitignore
.gitmodules
.travis.sh
.travis.yml
CHANGELOG.md
CMakeLists.txt
LICENSE.GPL.md
LICENSE.md
Makefile.am
README.md
bootstrap
configure.ac
default.nix
derivation.nix
handlebars.pc.in

README.md

handlebars.c

Build Status Build status Coverage Status License Doxygen

C implementation of handlebars.js, developed in conjunction with php-handlebars and handlebars.php.

The opcode compiler is fully featured, however the VM currently does not implement decorators, and therefore inline partials.

Installation

Nix / NixOS

nix-env -i -f https://github.com/jbboehr/handlebars.c/archive/master.tar.gz

or, in a .nix file:

(import <nixpkgs> {}).callPackage (import (fetchTarball {
  url = https://github.com/jbboehr/handlebars.c/archive/444272ab9503c5da7c06419ff38d61db70cf5b25.tar.gz;
  sha256 = "01mg8rkl67c3hw82l0ijdsn9kk0cq6vmd510ljy5ljdph1q2b8wm";
})) {}

Alpine Linux

apk add handlebars handlebars-dev handlebars-utils

Debian / Ubuntu

# Install dependencies
sudo apt-get install autoconf automake bison flex gcc libjson-c-dev liblmdb-dev \
                     libtalloc-dev libyaml-dev libtool m4 make pkg-config

# Install testing dependencies
sudo apt-get install check gdb lcov libpcre3-dev

# Install doc dependencies
sudo apt-get install doxygen

# Compile
git clone https://github.com/jbboehr/handlebars.c.git --recursive
cd handlebars.c
./bootstrap && ./configure && make && sudo make install && sudo ldconfig

OSX via Homebrew

# Install dependencies
brew install autoconf automake bison flex gcc json-c libtool libyaml lmdb pkg-config talloc

# Install testing dependencies
brew install check lcov pcre

# Install doc dependencies
brew install doxygen

# Compile
git clone https://github.com/jbboehr/handlebars.c.git --recursive
cd handlebars.c
./bootstrap && ./configure && make install

License

This project is licensed under the LGPLv2.1 or later. handlebars.js is licensed under the MIT license.