Permalink
Browse files

Added Mustache as a default parser. Updated README with the new infor…

…mation.
  • Loading branch information...
dhrrgn committed Aug 26, 2011
1 parent 61181d9 commit 17679d5bea552b90df62e356c02a3ae3d0f42665
Showing with 890 additions and 4 deletions.
  1. +6 −3 README.md
  2. +1 −1 config/parser.php
  3. +22 −0 vendor/Mustache/LICENSE
  4. +861 −0 vendor/Mustache/Mustache.php
View
@@ -2,9 +2,12 @@
## Installing
-Currently only available as download or clone from Github. Like any other package it must be put in its own 'parser' dir in the packages dir and added to your app/config/config.php as an always loaded package.
+Simply add `parser` to your config.php `always_loaded.packages` config option.
-*Important:* this package needs a recent version of Fuel at least RC3, RC2.1 and lower do not yet support this package.
+## Included Parsers
+
+* Mustache - A lightweight, yet powerful templating library.
+* SimpleTags - A library released by Dan Horrigan for basic template tag usage.
## Usage
@@ -36,7 +39,7 @@ View::forge('example.dwoo');
## Installing parsers
-Only SimpleTags is included. While many other drivers are included, their libraries are not and are by default expected in `app/vendor/lib_name` (capitalize lib_name), you'll have to download them yourself. Don't change the casing or anything, keep it as much original as possible within the `vendor/lib_name` dir to keep updating easy (also because some come with their own autoloader).
+Only SimpleTags and Mustache are included. While many other drivers are included, their libraries are not and are by default expected in `app/vendor/lib_name` (capitalize lib_name), you'll have to download them yourself. Don't change the casing or anything, keep it as much original as possible within the `vendor/lib_name` dir to keep updating easy (also because some come with their own autoloader).
You can configure them to be loaded from other locations by copying the parser.php config file to your app and editing it.
View
@@ -97,7 +97,7 @@
// MUSTACHE ( https://github.com/bobthecow/mustache.php )
// ------------------------------------------------------------------------
'View_Mustache' => array(
- 'include' => APPPATH.'vendor'.DS.'Mustache'.DS.'Mustache.php',
+ 'include' => PKGPATH.'parser'.DS.'vendor'.DS.'Mustache'.DS.'Mustache.php',
'delimiters' => array('{{', '}}'),
'environment' => array(
'charset' => 'UTF-8',
View
@@ -0,0 +1,22 @@
+Copyright (c) 2010 Justin Hileman
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
Oops, something went wrong.

0 comments on commit 17679d5

Please sign in to comment.