Skip to content

Commit afa66db

Browse files
committed
update documentation and put angularparser as a devDependency
1 parent d12b2fc commit afa66db

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
# dir menu entry, description, category)
245245
texinfo_documents = [
246246
('index', 'docxtemplater', u'docxtemplater Documentation',
247-
u'Edgar Hipp', 'docxtemplater', 'One line description of project.',
247+
u'Edgar Hipp', 'docxtemplater', 'Generate docx documents from docx templates',
248248
'Miscellaneous'),
249249
]
250250

docs/source/configuration.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ So I decided to use the qrCode format, which is a format that lets you identify
2525

2626
The option for this is `qrCode` (false for off, a function for on, default off)
2727

28-
The function takes two parameter: The first one is the string, the second the callback.
28+
The function takes two parameter: The first one is the string that was decoded by the qrcode module, the second the callback.
2929

3030
For example your configuration could be:
3131

@@ -53,13 +53,13 @@ For example your configuration could be:
5353
5454
.. note::
5555

56-
If you don't use that functionality, you should disable it, because it is quite slow (the image decoding)
56+
If you don't use that functionality, you should not enable it (you don't have to do anything), because the qrcode module is quite slow.
5757

5858
.. warning::
5959

6060
The qrCode functionality only works for PNG !
6161
They is no support for other file formats yet.
62-
The main problem being that their is no decoder for other file formats in Node.js
62+
The main problem being that their is no decoder for other file formats in Node.js.
6363
The library https://github.com/zhangyuanwei/node-images does support decoding for more file formats (gif, png, jpeg), but depends on 3 other none node dependencies.
6464

6565
.. warning::
@@ -108,16 +108,14 @@ https://github.com/Automattic/node-canvas/wiki
108108
canvas.pngStream().pipe(fs.createWriteStream('qr.png'));
109109
110110
111-
Angular Parser
111+
Custom Parser
112112
--------------
113113

114114
The name of this option is `parser` (function).
115115

116-
You can set the angular parser with the following code:
117-
118116
With a custom parser you can parse the tags to for example add operators
119117
like '+', '-', or whatever the way you want to parse expressions. See for
120-
a complete reference of all possibilities
118+
a complete reference of all possibilities of angularjs parsing:
121119
http://teropa.info/blog/2014/03/23/angularjs-expressions-cheatsheet.html
122120

123121
To enable this, you need to specify a custom parser.
@@ -131,6 +129,7 @@ docxtemplater comes shipped with this parser:
131129
{
132130
return {
133131
get:function(scope) {
132+
if (expression===".") return scope;
134133
return scope[expression]
135134
}
136135
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
"url": "https://github.com/edi9999/docxtemplater"
2424
},
2525
"dependencies": {
26-
"angular-expressions": "~0.2.1",
2726
"jszip": "^2.4.0",
2827
"png-js": "^0.1.1",
2928
"qrcode-reader": "0.0.5",
3029
"url": "^0.10.1",
3130
"xmldom": "0.1.x"
3231
},
3332
"devDependencies": {
33+
"angular-expressions": "~0.2.1",
3434
"gulp": "~3.8.0",
3535
"gulp-browserify": "^0.5.0",
3636
"gulp-coffee": "~2.0.1",

0 commit comments

Comments
 (0)