This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(dev): replace github dependency metalsmith-in-place (#796)
* chore(dev): replace github dependency metalsmith-in-place I've checked and the exact npm version (1.4.4) seems to miss 'exposeConsolidate' which we use. * patch package for the small change in the github version * add comment
- Loading branch information
Showing
3 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/node_modules/metalsmith-in-place/lib/index.js b/node_modules/metalsmith-in-place/lib/index.js | ||
index 4c0092a..9924129 100644 | ||
--- a/node_modules/metalsmith-in-place/lib/index.js | ||
+++ b/node_modules/metalsmith-in-place/lib/index.js | ||
@@ -24,7 +24,9 @@ module.exports = plugin; | ||
* | ||
* Options supported by metalsmith-in-place | ||
*/ | ||
-var settings = ['engine', 'partials', 'pattern', 'rename']; | ||
+// we need access to handlebars helpers (codepen etc.), so we use exposeConsolidate | ||
+// to add plugins/handlebars-helpers.js | ||
+var settings = ['engine', 'partials', 'pattern', 'rename', 'exposeConsolidate']; | ||
|
||
/** | ||
* Metalsmith plugin for in-place templating. | ||
@@ -57,6 +59,10 @@ function plugin(opts){ | ||
throw new Error('Unknown template engine: "' + opts.engine + '"'); | ||
} | ||
|
||
+ if (typeof opts.exposeConsolidate === 'function') { | ||
+ opts.exposeConsolidate(consolidate.requires); | ||
+ } | ||
+ | ||
// Map options to local variables | ||
var engine = opts.engine; | ||
var partials = opts.partials; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters