Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Documenting the new templating feature on README

  • Loading branch information...
commit 24e0ad411220ed0aec16abf31496d1c4dd5c1285 1 parent 6fdd1f9
@augusto-herrmann augusto-herrmann authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.rst
View
15 README.rst
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.