Skip to content

Commit

Permalink
Use const over let in README examples
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh committed Jul 5, 2020
1 parent 251fb8a commit bdf0f5a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -24,8 +24,8 @@ How do I use this thing?
A quick example:

```js
var Metalsmith = require("metalsmith");
var htmlMinifier = require("metalsmith-html-minifier");
const Metalsmith = require("metalsmith");
const htmlMinifier = require("metalsmith-html-minifier");
Metalsmith(__dirname)
.use(htmlMinifier()) // Use the default options
.build();
Expand All @@ -34,8 +34,8 @@ Metalsmith(__dirname)
The above will minify all the HTML files (files ending in `.html`) it processes. To provide a custom glob for files to minify:

```js
var Metalsmith = require("metalsmith");
var htmlMinifier = require("metalsmith-html-minifier");
const Metalsmith = require("metalsmith");
const htmlMinifier = require("metalsmith-html-minifier");
Metalsmith(__dirname)
.use(htmlMinifier({
pattern: "**/*.html",
Expand All @@ -46,8 +46,8 @@ Metalsmith(__dirname)
You can also pass an array of globs to match filenames:

```js
var Metalsmith = require("metalsmith");
var htmlMinifier = require("metalsmith-html-minifier");
const Metalsmith = require("metalsmith");
const htmlMinifier = require("metalsmith-html-minifier");
Metalsmith(__dirname)
.use(htmlMinifier({
pattern: ["**/*.html", "**/*.xhtml"],
Expand All @@ -58,8 +58,8 @@ Metalsmith(__dirname)
To pass options to the minifier (to enable or disable optimizations):

```js
var Metalsmith = require("metalsmith");
var htmlMinifier = require("metalsmith-html-minifier");
const Metalsmith = require("metalsmith");
const htmlMinifier = require("metalsmith-html-minifier");
Metalsmith(__dirname)
.use(htmlMinifier({
minifierOptions: {
Expand Down

0 comments on commit bdf0f5a

Please sign in to comment.