metalsmith-layouts
Advanced tools
Comparing version 1.6.4 to 1.6.5
@@ -0,1 +1,5 @@ | ||
1.6.5 - May 3, 2016 | ||
------------------- | ||
* normalize partial name for windows | ||
1.6.4 - February 22, 2016 | ||
@@ -2,0 +6,0 @@ ------------------------- |
@@ -39,3 +39,3 @@ /** | ||
partials[name] = partialPath; | ||
partials[name.replace(/\\/g, '/')] = partialPath; | ||
} | ||
@@ -42,0 +42,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"repository": "git://github.com/superwolff/metalsmith-layouts.git", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"license": "MIT", | ||
@@ -9,0 +9,0 @@ "main": "lib/index.js", |
@@ -14,4 +14,6 @@ # metalsmith-layouts | ||
This plugin allows you to apply layouts to your source files. It passes your source files to the selected layout as the variable `contents` and renders the result with the templating engine of your choice. You can use any templating engine supported by [consolidate.js](https://github.com/tj/consolidate.js#supported-template-engines). For support questions please use [stack overflow][stackoverflow-url] or our [slack channel][slack-url]. For templating engine specific questions try the aforementioned channels, as well as the documentation for [consolidate.js](https://github.com/tj/consolidate.js) and your templating engine of choice. | ||
This plugin allows you to apply layouts to your source files. It passes your source files to the selected layout as the variable `contents` and renders the result with the templating engine of your choice. You can use any templating engine supported by [consolidate.js](https://github.com/tj/consolidate.js#supported-template-engines). | ||
For support questions please use [stack overflow][stackoverflow-url] or our [slack channel][slack-url]. For templating engine specific questions try the aforementioned channels, as well as the documentation for [consolidate.js](https://github.com/tj/consolidate.js) and your templating engine of choice. | ||
## Installation | ||
@@ -18,0 +20,0 @@ |
@@ -125,2 +125,20 @@ var assert = require('assert'); | ||
it('should find partials in subdirectories correctly', function(done){ | ||
// This test would only fail on Windows if readPartials did not | ||
// replace backslashes in partial names | ||
var instance = Metalsmith('test/fixtures/partials-subdirectories') | ||
.use(layouts({ | ||
engine: 'handlebars', | ||
partials: 'layouts/partials' | ||
})); | ||
instance.build(function(err){ | ||
if (err) { | ||
return done(err); | ||
} | ||
equal('test/fixtures/partials-subdirectories/expected', 'test/fixtures/partials-subdirectories/build'); | ||
done(); | ||
}); | ||
}); | ||
it('should accept a partials option', function(done){ | ||
@@ -127,0 +145,0 @@ Metalsmith('test/fixtures/partials-option') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
257121
91
401
223