Permalink
Browse files

Merge pull request #12 from augusto-herrmann/master

Updated documentation for the new templating feature
  • Loading branch information...
2 parents 6fdd1f9 + 24e0ad4 commit 31759b3549f5a99be7c519b061d6efb4c8d89d13 @tav committed Oct 26, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.rst
View
@@ -29,6 +29,8 @@ The default support includes:
* Creating a JSON manifest file for use in your web app's static handlers.
+* Generating files processed by a templating language (e.g. for inserting content from other files).
+
The tool is driven by the configuration you specify in an ``assetgen.yaml``
file, e.g.
@@ -64,6 +66,19 @@ file, e.g.
- encoder/encode.ts
sourcemaps: true
+ - js/content-inserter.js
+ source:
+ - static/html/content.html # plain html content
+ - static/js/Content.coffee # content handling logic
+ - raw: "})();"
+ template: |
+ (function(){var htmlContent = ${source|trim,jsliteral};
+ # the source parameter gets processesed for each static source
+ # file (i.e. not raw strings) which is not processed in any way
+ # i.e. not CoffeeScript/TypeScript files.
+ # Also, templates only works when source maps are disabled
+ sourcemaps: false
+
- gfx/*:
source: static/gfx/*
type: binary

0 comments on commit 31759b3

Please sign in to comment.