Commits

Andreas Knecht committed 797c421

Added Readme.

  • Participants
  • Parent commits 55d98aa

Comments (0)

Files changed (1)

+Soy Compile
+===========
+
+Soy compiler is simple little npm package that can be included to compile soy templates in a source directory
+to a target directory.  This is useful to compile soy templates for inclusion on the client-side (to allow
+for client-side templates).
+
+Installation
+------------
+
+Install `npm install soycompiler`
+
+Usage
+-----
+
+```js
+var soycompiler = require("../lib/soycompiler.js");
+
+soycompiler.compileTemplates({
+    "sourceDir":__dirname + "/source",
+    "targetDir":__dirname + "/target",
+    "autorecompile":true
+}, function (err) {
+    if (err) {
+        throw new err;
+    }
+});
+```
+
+See examples/example.js.  The autorecompile flag is optional and may only be necessary in development.  Setting
+this flag to true will automatically recompile all soy templates on any file change.  (Currently changing any template
+will recompile *all* templates)
+
+License
+-------
+
+Copyright 2012 Andreas Knecht.
+
+Licensed under the Apache License, Version 2.0.
+See the top-level file `LICENSE.txt` and (http://www.apache.org/licenses/LICENSE-2.0).