1- [ ![ NPM] [ npm ]] [ npm-url ]
2- [ ![ Deps] [ deps ]] [ deps-url ]
3- [ ![ Tests] [ travis ]] [ travis-url ]
4- [ ![ Coverage] [ cover ]] [ cover-url ]
5-
61<div align =" center " >
7- <img width =" 220 " height =" 150 " title =" PostHTML " src =" http://posthtml.github.io/posthtml/logo.svg " >
8- <img width =" 108 " height =" 108 " title =" PostCSS " src =" http://postcss.github.io/postcss/logo.svg " hspace =" 20 " >
2+ <img width =" 150 " height =" 150 " alt =" PostHTML " src =" https://posthtml.github.io/posthtml/logo.svg " >
93 <h1 >PostCSS Plugin</h1 >
10- <p >Use <a href =" https://github.com/postcss/postcss/ " >PostCSS</a > in HTML</p >
4+ <p >Use <a href =" https://github.com/postcss/postcss/ " >PostCSS</a > with PostHTML</p >
5+
6+ [ ![ Version] [ npm-version-shield ]] [ npm ]
7+ [ ![ Build] [ github-ci-shield ]] [ github-ci ]
8+ [ ![ License] [ license-shield ]] [ license ]
9+ [ ![ Downloads] [ npm-stats-shield ]] [ npm-stats ]
1110</div >
1211
13- < h2 align = " center " > Install</ h2 >
12+ ## Install
1413
1514``` bash
1615npm i -D posthtml-postcss
1716```
1817
19- < h2 align = " center " > Usage</ h2 >
18+ ## Usage
2019
2120``` js
2221const { readFileSync } = require (' fs' )
@@ -28,7 +27,7 @@ const postcssPlugins = []
2827const postcssOptions = {}
2928const filterType = / ^ text\/ css$ /
3029
31- const filePath = ` ${ __dirname } /index.html` ;
30+ const filePath = ` ${ __dirname } /index.html`
3231const html = readFileSync (filePath, ' utf8' )
3332
3433posthtml ([ postcss (postcssPlugins, postcssOptions, filterType) ])
@@ -40,7 +39,7 @@ If you don't pass arguments to `posthtml-postcss`, it will use your project's Po
4039
4140Notice that we're setting the option ` from ` when calling ` process ` . ` posthtml-postcss ` forwards this to PostCSS, which is useful for syntax error messages. (` postcss-cli ` and ` gulp-posthtml ` are setting ` from ` automatically.)
4241
43- < h2 align = " center " > Example</ h2 >
42+ ## Example
4443
4544``` js
4645const posthtml = require (' posthtml' )
@@ -62,6 +61,8 @@ posthtml([ postcss(postcssPlugins, postcssOptions, filterType) ])
6261 .then ((result ) => console .log (result .html ))
6362```
6463
64+ Output:
65+
6566``` html
6667<style >
6768 div { display : -webkit-flex ;display : -ms-flexbox ;display : flex ; }
@@ -71,41 +72,11 @@ posthtml([ postcss(postcssPlugins, postcssOptions, filterType) ])
7172</div >
7273```
7374
74- <h2 align =" center " >LICENSE</h2 >
75-
76- > MIT License (MIT)
77-
78- > Copyright (c) PostHTML Ivan Voischev <voischev.ivan@ya.ru >
79-
80- > Permission is hereby granted, free of charge, to any person obtaining a copy
81- of this software and associated documentation files (the "Software"), to deal
82- in the Software without restriction, including without limitation the rights
83- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
84- copies of the Software, and to permit persons to whom the Software is
85- furnished to do so, subject to the following conditions:
86-
87- > The above copyright notice and this permission notice shall be included in all
88- copies or substantial portions of the Software.
89-
90- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
91- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
92- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
93- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
94- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
95- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
96- SOFTWARE.
97-
98- [ npm ] : https://img.shields.io/npm/v/posthtml-postcss.svg
99- [ npm-url ] : https://npmjs.com/package/posthtml-postcss
100-
101- [ deps ] : https://david-dm.org/posthtml/posthtml-postcss.svg
102- [ deps-url ] : https://david-dm.org/posthtml/posthtml-postcss
103-
104- [ style ] : https://img.shields.io/badge/code%20style-standard-yellow.svg
105- [ style-url ] : http://standardjs.com/
106-
107- [ travis ] : http://img.shields.io/travis/posthtml/posthtml-postcss.svg
108- [ travis-url ] : https://travis-ci.org/posthtml/posthtml-postcss
109-
110- [ cover ] : https://coveralls.io/repos/github/posthtml/posthtml-postcss/badge.svg?branch=master
111- [ cover-url ] : https://coveralls.io/github/posthtml/posthtml-postcss?branch=master
75+ [ npm ] : https://www.npmjs.com/package/posthtml-postcss
76+ [ npm-version-shield ] : https://img.shields.io/npm/v/posthtml-postcss.svg
77+ [ npm-stats ] : https://npm-stat.com/charts.html?package=posthtml-postcss
78+ [ npm-stats-shield ] : https://img.shields.io/npm/dt/posthtml-postcss.svg
79+ [ github-ci ] : https://github.com/posthtml/posthtml-postcss/actions/workflows/nodejs.yml
80+ [ github-ci-shield ] : https://github.com/posthtml/posthtml-postcss/actions/workflows/nodejs.yml/badge.svg
81+ [ license ] : ./LICENSE
82+ [ license-shield ] : https://img.shields.io/npm/l/posthtml-postcss.svg
0 commit comments