1- # PostHTML Loader
2- Webpack loader for [ PostHTML] ( https://github.com/posthtml/posthtml )
1+ ![ [ Wepack]] ( ) <img align =" right " width =" 220 " height =" 200 " title =" PostHTML logo " src =" http://posthtml.github.io/posthtml/logo.svg " >
32
4- ## Install
3+ # PostHTML Loader Webpack loader for [ PostHTML] ( https://github.com/posthtml/posthtml )
4+ # Install
5+ [ ![ npm] ( https://badge.fury.io/js/posthtml-loader.svg )] ( https://badge.fury.io/js/posthtml-loader ) [ dependencies] ( https://david-dm.org/michael-ciniawsky/posthtml-loader.svg )
56
67``` bash
78
89(sudo) npm i -D posthtml-loader
910```
1011
11- ## Usage
12- ### Setup
12+ # Usage
13+ ## Setup
1314
1415``` javascript
1516// webpack.config.js
@@ -31,7 +32,7 @@ posthtml: function () {
3132}
3233```
3334
34- ### Options
35+ ## Options
3536
3637``` javascript
3738
@@ -59,7 +60,7 @@ module.exports = {
5960}
6061```
6162
62- ### Extract
63+ ## Extract
6364[ extract-text-plugin] ( https://github.com/webpack/extract-text-webpack-plugin )
6465
6566``` javascript
@@ -88,24 +89,16 @@ module.exports = {
8889}
8990```
9091
91- ## Integration
92- ### Templates
93- #### EJS
92+ # Integration
93+ ## Templates
94+ ### EJS
9495[ ejs-html-loader] ( https://github.com/bline/jade-html-loader )
9596
9697``` javascript
9798
9899{ test: / \. ejs$ / , loader: ' html!posthtml!ejs-html' }
99100```
100101
101- #### HBS
102- [ handlebars-loader] ( https://github.com/altano/handlebars-loader )
103-
104- ``` javascript
105-
106- { test: / \. hbs$ / , loader: ' html!posthtml!handlebars-template' }
107- ```
108-
109102#### Jade
110103[ jade-html-loader] ( https://github.com/bline/jade-html-loader )
111104
@@ -114,70 +107,70 @@ module.exports = {
114107{ test: / \. jade$ / , loader: ' html!posthtml!jade-html' }
115108```
116109
117- #### Templates supported by [ consolidate] ( https://github.com/tj/consolidate.js )
110+ ### Templates supported by [ consolidate] ( https://github.com/tj/consolidate.js )
118111[ template-html-loader] ( https://github.com/bline/jade-html-loader )
119112
120113``` javascript
121114
122- { test: / \. hogan $ / , loader: ' html!posthtml!template-html?engine=hogan ' }
115+ { test: / \. hbs $ / , loader: ' html!posthtml!template-html?engine=handlebars ' }
123116```
124117
125- ### String
126- #### HTML
118+ ## String
119+ ### HTML
127120[ html-loader] ( https://github.com/webpack/html-loader )
128121
129122``` javascript
130123
131- { test: / \. xml $ / , loader: ' html!posthtml' }
124+ { test: / \. html $ / , loader: ' html!posthtml' }
132125```
133126
134- #### SVG
127+ ### SVG
135128[ svg-loader] ( https://github.com/dolbyzerr/svg-loader )
136129
137130``` javascript
138131
139- { test: / \. xml $ / , loader: ' svg!posthtml' }
132+ { test: / \. svg $ / , loader: ' svg!posthtml' }
140133```
141134
142- #### XML
135+ ### XML
143136[ xml-loader] ( https://github.com/gisikw/xml-loader )
144137
145138``` javascript
146139
147140{ test: / \. xml$ / , loader: ' xml!posthtml' }
148141```
149142
150- ### File
143+ ## File
151144[ file-loader] ( https://github.com/webpack/file-loader ) && [ val-loader] ( https://github.com/webpack/val-loader )
152145
153- #### HTML
146+ ### HTML
154147[ html-loader] ( https://github.com/webpack/html-loader )
155148
156149``` javascript
157150
158151{ test: / \. html$ / , loader: ' file?name=[name].[ext]!val!html!posthtml' }
159152```
160153
161- #### SVG
154+ ### SVG
162155[ svg-loader] ( https://github.com/dolbyzerr/svg-loader )
163156
164157``` javascript
165158
166159{ test: / \. svg$ / , loader: ' file?name=[name].[ext]!val!svg!posthtml' }
167160```
168161
169- ### DOM
162+ ## DOM
170163[ dom-loader] ( https://github.com/Wizcorp/dom-loader )
171164
172- #### HTML
165+ ### HTML
173166[ html-loader] ( https://github.com/webpack/html-loader )
174167
175168``` javascript
176169
177170{ test: / \. html$ / , loader: ' dom!html!posthtml' }
178171```
179172
180- #### SVG
173+ ### SVG
181174[ svg-loader] ( https://github.com/dolbyzerr/svg-loader )
182175
183176``` javascript
0 commit comments