How do I compile Mustache.php to use with the Template Field module? The Template Field module requires the Mastache Template Rendering Library.


  The Mustache Template Rendering Library can be found here. It must be
  installed at libraries/mustache/Mustache.php.


However, the Mustache.php file is not provided, and I'm not sure why. There is some discussion about using the composure.php library to compile it. What I'm supposed to do?

The Template Field module is looking for a file called Mustache.php which doesn't exist in the git repo.

  /**
   * Verify anything before rendering
   * @param Template
   * @param array $data the data to render in the template
   * @return boolean
   */
  public function valid(Template $template, $data) {
    // Does the mustache library exist?
    if (file_exists(self::mustache_path())) {
      return TRUE;
    }

    watchdog('template_api', t('Mustache Library was not found'));
    return FALSE;
  }

  public static function mustache_path() {
    return libraries_get_path('mustache') . '/Mustache.php';
  }


There is a mention for using Composer but I'm not sure what that does. I have tried adding the Drush Composer extension to build a file but I don't understand how the Composer extension works.
Open command line.
cd to your basedir/sites/all/libraries
mkdir mustache &amp;&amp; cd mustache
git clone https://github.com/bobthecow/mustache.php.git


You now have /sites/all/libraries/mustache/mustache.php .

Mustache.php is actually the name of the folder, not an individual php file.

To get an earlier version, such as 1.0, try


Open command line.
cd to your basedir/sites/all/libraries
mkdir mustache &amp;&amp; cd mustache
wget https://github.com/bobthecow/mustache.php/archive/v1.0.0.tar.gz
tar -zxvf v1.0.0.tar.gz
mv mustache.php-1.0.0 mustache.php