1JEMPLATE(1)           User Contributed Perl Documentation          JEMPLATE(1)
2
3
4

Usage:

6           jemplate --runtime [runtime-opt]
7
8           jemplate --compile [compile-opt] template-list
9
10           jemplate --runtime [runtime-opt] --compile [compile-opt] template-list
11
12           jemplate --list template-list
13
14       Where "--runtime" and "runtime-opt" can include:
15
16           --runtime           Equivalent to --ajax=ilinsky --json=json2
17           --runtime=standard
18
19           --runtime=lite      Same as --ajax=none --json=none
20           --runtime=jquery    Same as --ajax=jquery --json=none
21           --runtime=yui       Same as --ajax=yui --json=yui
22           --runtime=legacy    Same as --ajax=gregory --json=json2
23
24           --json              By itself, equivalent to --json=json2
25           --json=json2        Include http://www.json.org/json2.js for parsing/stringifying
26           --json=yui          Use YUI: YAHOO.lang.JSON (requires external YUI)
27           --json=none         Doesn't provide any JSON functionality except a warning
28
29           --ajax              By itself, equivalent to --ajax=xhr
30           --ajax=jquery       Use jQuery for Ajax get and post (requires external jQuery)
31           --ajax=yui          Use YUI: yui/connection/connection.js (requires external YUI)
32           --ajax=xhr          Use XMLHttpRequest (will automatically use --xhr=ilinsky if --xhr is not set)
33           --ajax=none         Doesn't provide any Ajax functionality except a warning
34
35           --xhr               By itself, equivalent to --xhr=ilinsky
36           --xhr=ilinsky       Include http://code.google.com/p/xmlhttprequest/
37           --xhr=gregory       Include http://www.scss.com.au/family/andrew/webdesign/xmlhttprequest/
38
39           --xxx               Include XXX and JJJ helper functions
40
41           --compact           Use the YUICompressor compacted version of the runtime
42
43       Where "compile-opt" can include:
44
45           --start-tag
46           --end-tag
47           --pre-chomp
48           --post-chomp
49           --trim
50           --any-case
51           --eval
52           --noeval
53           -s, --source
54           --exclude
55
56           See below for more information
57
58   Example:
59       Write the Jemplate runtime code into Jemplate.js, then compile all the
60       template files in the templates/ directory and put the output in
61       my-jemplate.js.
62
63           jemplate --runtime > Jemplate.js
64           jemplate --compile templates/* > my-jemplate.js
65
66       Do the same thing, but put the output into one file.
67
68           jemplate --runtime > my-jemplate.js
69           jemplate --compile templates/* >> my-jemplate.js
70
71   template-list:
72       The template-list is the list of template files that will be compiled.
73       If something in the list is a file, then the template name will be just
74       the file name. If it is a directory, then all the files under that
75       directory will be found, and the relative paths to those files will be
76       the template name.
77
78       So 'template/foo/bar.tt2' will be named 'bar.tt2', but 'template/' will
79       find a template named 'foo/bar.tt2'.
80
81       It is important to know what Jemplate thinks the template name will be
82       when you are writing templates or code that refers to other templates.
83       Use the --list option to check this.
84

Commands:

86           -r, --runtime
87               This flag tells Jemplate to print the Jemplate JavaScript
88               runtime code to STDOUT. You should redirect this output into
89               a .js file.
90
91           -c, --compile
92               The --compile flag tells Jemplate to actually compile templates.
93               The output is written to STDOUT.
94
95           -l, --list
96               Just print (STDOUT) the template names that Jemplate would use
97               from the template-list.
98

Template Toolkit Compile Options:

100       Jemplate allows you to specify the following Template Toolkit compile
101       time options. Full descriptions of these options are available at
102       <http://www.template-toolkit.org/docs/plain/Manual/Config.html>.
103
104       These options may either be set as JEMPLATE_* environment variables or
105       as command line switches.
106
107           --start-tag (JEMPLATE_START_TAG)
108               Specify the starting template delimiter to use. Default is '[%'.
109
110           --end-tag (JEMPLATE_END_TAG)
111               Specify the ending template delimiter to use. Default is '%]'.
112
113           --pre-chomp (JEMPLATE_PRE_CHOMP)
114               Chomp leading whitespace automatically. Default is off.
115
116           --post-chomp (JEMPLATE_POST_CHOMP)
117               Chomp trailing whitespace automatically. Default is off.
118
119           --trim (JEMPLATE_TRIM)
120               Trim leading and trailing whitespace. Default is off.
121
122           --any-case (JEMPLATE_ANYCASE)
123               Allow lower or mixed case for template directives. Default is off.
124
125           --eval (--noeval) (JEMPLATE_EVAL_JAVASCRIPT)
126               Allow the execution of raw JavaScript. Default is on.
127               Use --noeval to disallow it.
128

Jemplate Options:

130       These compile time options are specific to Jemplate.
131
132           -s, --source
133               Include the original template source code as a JavaScript
134               comment next to each compiled template.
135
136           --exclude
137               Exclude any file matching the given regular expression.
138
139
140
141perl v5.32.1                      2021-01-27                       JEMPLATE(1)
Impressum