easy-template-x 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,6 +18,7 @@ Generate docx documents from templates, in Node or in the browser.
18
18
  - [Link plugin](#link-plugin)
19
19
  - [Raw xml plugin](#raw-xml-plugin)
20
20
  - [Writing custom plugins](#writing-your-own-plugins)
21
+ - [Listing tags](#listing-tags)
21
22
  - [Scope resolution](#scope-resolution)
22
23
  - [Extensions](#extensions)
23
24
  - [Community Extensions](#community-extensions)
@@ -383,6 +384,19 @@ export interface RawXmlContent extends PluginContent {
383
384
  }
384
385
  ```
385
386
 
387
+ ## Listing tags
388
+
389
+ You can get the list of [tags](https://github.com/alonrbar/easy-template-x/blob/8a88535ef090fc357cf3523411bef0d0729d10c8/src/compilation/tag.ts) in a template by calling the `parseTags` method as follows:
390
+
391
+ ```typescript
392
+ import { TemplateHandler } from 'easy-template-x';
393
+
394
+ const templateFile = fs.readFileSync('myTemplate.docx');
395
+
396
+ const handler = new TemplateHandler();
397
+ const tags = await handler.parseTags(templateFile);
398
+ ```
399
+
386
400
  ## Scope resolution
387
401
 
388
402
  `easy-template-x` supports tag data scoping. That is, you can reference
@@ -3308,7 +3308,7 @@ class TemplateHandler {
3308
3308
  constructor(options) {
3309
3309
  var _this$options$extensi, _this$options$extensi2, _this$options$extensi3, _this$options$extensi4;
3310
3310
 
3311
- _defineProperty(this, "version", "3.0.1" );
3311
+ _defineProperty(this, "version", "3.0.2" );
3312
3312
 
3313
3313
  _defineProperty(this, "xmlParser", new XmlParser());
3314
3314
 
@@ -3280,7 +3280,7 @@ class TemplateHandler {
3280
3280
  constructor(options) {
3281
3281
  var _this$options$extensi, _this$options$extensi2, _this$options$extensi3, _this$options$extensi4;
3282
3282
 
3283
- _defineProperty(this, "version", "3.0.1" );
3283
+ _defineProperty(this, "version", "3.0.2" );
3284
3284
 
3285
3285
  _defineProperty(this, "xmlParser", new XmlParser());
3286
3286
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-template-x",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Generate docx documents from templates, in Node or in the browser.",
5
5
  "keywords": [
6
6
  "docx",