Mercurial > hg > MakeItSo
annotate README.txt @ 91:672d2d3ee322
document a bit and add a test for an include example
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 10 Jan 2011 21:42:32 -0800 |
parents | 324a70edb73c |
children | bfab7367eb56 |
rev | line source |
---|---|
7 | 1 Make It So! |
2 =========== | |
3 | |
4 templates for the people | |
5 | |
6 So people generally do things the easiest way possible. If you try to | |
7 get people to send you a file with, say, a "one-off" script, they will | |
8 probably hard code a bunch of stuff in it. Then, you're not really | |
9 sure what needs to be changed and because you're human you might make | |
10 a mistake. Worse, its a perl script and you're a python programmer. | |
11 You don't know what that script does! | |
12 | |
13 And this is the time of the iceberg. If it really is a one-off, who | |
14 cares? But quickly one-offs become a deployment story, and not a very | |
15 efficient one. | |
91
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
16 |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
17 Variable Conventions |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
18 -------------------- |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
19 |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
20 MakeItSo! provides a few variables for you. You can include another |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
21 file or URL using {{include(URI)}}, where URI is the file path or the |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
22 URL (of course, internet is required to include remote resources). The |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
23 included resource is not included. |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
24 |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
25 Files and URLS being interpolated also have the variable %(here)s, |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
26 which is the parent of their resource. Therefor, using sensible path |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
27 conventions, a neighboring file may be (e.g.) included like |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
28 |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
29 {{include(here + 'foo.txt')}} |