Skip to content

Commit 3ea37d2

Browse files
committed
Docs: Tweak readme a bit
1 parent e24751b commit 3ea37d2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# mini-html-webpack-plugin - A miniature version of html-webpack-plugin with less functionality
1+
# mini-html-webpack-plugin: a miniature version of html-webpack-plugin with only necessary features
22

33
[![npm](https://img.shields.io/npm/v/mini-html-webpack-plugin.svg)](https://www.npmjs.com/package/mini-html-webpack-plugin) [![Build Status](https://travis-ci.org/styleguidist/mini-html-webpack-plugin.svg)](https://travis-ci.org/styleguidist/mini-html-webpack-plugin)
44

5-
The plugin writes CSS and JS asset paths for you automatically. You can also override most of it. It does **not** work with html-webpack-plugin plugins!
5+
The plugin writes CSS and JS asset paths for you automatically. Works with webpack 3 and 4.
6+
7+
**It does not work with html-webpack-plugin plugins!**
68

79
## Usage
810

@@ -17,15 +19,15 @@ const config = {
1719
plugins: [
1820
new MiniHtmlWebpackPlugin({
1921
context: {
20-
title: 'Webpack demo' // Available in the context below
22+
title: 'Webpack demo'
2123
},
2224
filename: 'demo.html' // Optional, defaults to `index.html`
2325
})
2426
]
2527
};
2628
```
2729

28-
## How to Minify HTML?
30+
### HTML minification
2931

3032
```javascript
3133
const minify = require('html-minifier').minify;
@@ -44,7 +46,7 @@ const config = {
4446
};
4547
```
4648

47-
## Custom Templates
49+
### Custom templates
4850

4951
Use [@vxna/mini-html-webpack-template](https://www.npmjs.com/package/@vxna/mini-html-webpack-template) to add an app container div, a favicon, meta tags, inline JavaScript or CSS.
5052

@@ -61,7 +63,7 @@ const config = {
6163
plugins: [
6264
new MiniHtmlWebpackPlugin({
6365
context: {
64-
title: 'Custom template'
66+
title: 'Custom template' // Available in the context below
6567
},
6668
template: ({ css, js, title, publicPath }) =>
6769
`<!DOCTYPE html>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mini-html-webpack-plugin",
33
"version": "0.0.0-development",
4-
"description": "A miniature version of html-webpack-plugin with less functionality",
4+
"description": "A miniature version of html-webpack-plugin with only necessary features",
55
"main": "index.js",
66
"files": [
77
"index.js"

0 commit comments

Comments
 (0)