docx-templates
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -5,4 +5,8 @@ # Changelog | ||
# 2.1.0 (Jan. 24, 2017) | ||
## 2.1.1 (Jan. 25, 2017) | ||
* Fix a case in which the tool hangs indefinitely when a query is expected and not found. | ||
## 2.1.0 (Jan. 24, 2017) | ||
* [M] Add support for commands in headers, footers and elsewhere | ||
@@ -9,0 +13,0 @@ |
@@ -6,13 +6,3 @@ const createReport = require('../../lib'); | ||
template: process.argv[2], | ||
data: (query) => | ||
fetch('http://graphql-swapi.parseapp.com', { | ||
method: 'POST', | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ query }), | ||
}) | ||
.then((res) => res.json()) | ||
.then((res) => res.data), | ||
data: () => {}, | ||
}); | ||
@@ -19,0 +9,0 @@ |
@@ -36,2 +36,3 @@ 'use strict'; | ||
else { | ||
var fFound = false; | ||
while (nodeIn._parent != null) { | ||
@@ -42,2 +43,3 @@ var _parent = nodeIn._parent; | ||
nodeIn = nextSibling; | ||
fFound = true; | ||
break; | ||
@@ -47,2 +49,3 @@ } | ||
} | ||
if (!fFound) break; | ||
} | ||
@@ -49,0 +52,0 @@ |
{ | ||
"name": "docx-templates", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Template-based docx report creation", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -151,2 +151,15 @@ # Docx-templates [![Build Status](https://travis-ci.org/guigrpa/docx-templates.svg)](https://travis-ci.org/guigrpa/docx-templates) [![Coverage Status](https://coveralls.io/repos/github/guigrpa/docx-templates/badge.svg?branch=master)](https://coveralls.io/github/guigrpa/docx-templates?branch=master) [![npm version](https://img.shields.io/npm/v/docx-templates.svg)](https://www.npmjs.com/package/docx-templates) | ||
#### `EXEC` (`!`) | ||
Executes a given JavaScript snippet, just like `INS` or `=`, but doesn't insert anything in the document. You can use `EXEC`, for example, to define functions or constants before using them elsewhere in your template. | ||
``` | ||
+++EXEC | ||
const myFun = () => Math.random(); | ||
const MY_CONSTANT = 3; | ||
+++ | ||
+++! const ANOTHER_CONSTANT = 5; +++ | ||
``` | ||
#### `FOR` and `END-FOR` | ||
@@ -153,0 +166,0 @@ |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
922010
249
0
6734