From 91ec54efd37e49e55a59e65e7005987c01c1feea Mon Sep 17 00:00:00 2001 From: Will Kent-Daggett Date: Mon, 22 Aug 2016 10:27:10 -0700 Subject: [PATCH 1/3] add default value for `options` passed to constructor (re: #1) --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 97d30fb..43e7f2d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -7,7 +7,7 @@ let include = require('reshape-include') let layouts = require('reshape-layouts') let retext = require('reshape-retext') -module.exports = function spikeHtmlStandards (options) { +module.exports = function spikeHtmlStandards (options = {}) { // set options using webpack shortcut if present if (options.webpack) { options.filename = options.webpack.resourcePath From d53a822c9dab4e0d405a1eddf669a7d67ceadad2 Mon Sep 17 00:00:00 2001 From: will kent-daggett Date: Mon, 22 Aug 2016 11:23:12 -0700 Subject: [PATCH 2/3] :book: correct example usage --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 46066f8..af900af 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,7 @@ This is nothing more than a light wrapper around a bundle of plugins. Options ar const reshape = require('reshape') const htmlStandards = require('spike-html-standards') -reshape({ - plugins: htmlStandards(/* options */) -}) +reshape(htmlStandards(/* options */)) ``` By default, the html standard plugin pack includes: From 21d2c2835c5c3ce4f07d49dbb800921b531ecd97 Mon Sep 17 00:00:00 2001 From: Will Kent-Daggett Date: Mon, 22 Aug 2016 11:33:54 -0700 Subject: [PATCH 3/3] Revert ":book: correct example usage" This reverts commit d53a822c9dab4e0d405a1eddf669a7d67ceadad2. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af900af..46066f8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ This is nothing more than a light wrapper around a bundle of plugins. Options ar const reshape = require('reshape') const htmlStandards = require('spike-html-standards') -reshape(htmlStandards(/* options */)) +reshape({ + plugins: htmlStandards(/* options */) +}) ``` By default, the html standard plugin pack includes: