From 0b89ce7d204ae31fc97b18ecec204c3176661acd Mon Sep 17 00:00:00 2001 From: Charles Blaxland Date: Thu, 14 Aug 2014 21:29:21 +1000 Subject: [PATCH] Update readme with template content documentation --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index fbcb64e..335609e 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,19 @@ To use this template, configure the plugin like this: } ``` +Alternatively, if you already have your template's content in a String, you +can pass it to the plugin using the `templateContent` option: +```javascript +plugins: [ + new HtmlWebpackPlugin({ + templateContent: templateContentString + }) +] +``` + +Note the plugin will throw an error if you specify both `template` _and_ +`templateContent`. + The `o` variable in the template is the data that is passed in when the template is rendered. This variable has the following attributes: - `htmlWebpackPlugin`: data specific to this plugin