From 28da7538d3ef2e7a439827c99ce71fd81ebe7ef5 Mon Sep 17 00:00:00 2001 From: Eitan Rousso Date: Fri, 5 Feb 2016 10:16:02 +0200 Subject: [PATCH] Update README.md added documentation for rt-include --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index eb1c77b..738dd1c 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ http://plugins.jetbrains.com/plugin/7648 * [rt-class](#rt-class) * [rt-require](#rt-require) * [rt-template](#rt-template) + * [rt-include](#rt-include) * [styles](#styles) * [event handlers](#event-handlers) @@ -269,6 +270,34 @@ define([ }); ``` +## rt-include +Optionally choose to extract static contents out of rt files.
+rt-include is a "macro" that takes a text file (e.g svg/html/xml) and injects it into the file as if it was part of the original markup. + +###### Sample: +given `main.rt`: +```html +
+ +
+``` + +and `my-icon.svg`: +```html + + + +``` + +is equivalent to: +```html +
+ + + +
+``` + ## style React templates allow the settings of styles inline in HTML, optionally returning an object from the evaluation context. By default, style names will be converted from hyphen-style to camelCase-style naming.