Comparing version 0.0.6 to 0.0.7
@@ -1,2 +0,4 @@ | ||
module.exports = function(content) { | ||
const getLayout = require('./getLayout'); | ||
module.exports = function(content, forceLayout) { | ||
if (!content) return {}; | ||
@@ -13,3 +15,7 @@ | ||
if (forceLayout) { | ||
data.layout = getLayout(data); | ||
} | ||
return data; | ||
} |
const parseMetadata = require('./parseMetadata'); | ||
module.exports = function(view) { | ||
view.data = parseMetadata(view.template.match(/^---[\s\S]*---/)); | ||
module.exports = function(view, forceLayout) { | ||
view.data = parseMetadata(view.template.match(/^---[\s\S]*---/), forceLayout); | ||
view.template = view.template.replace(/^---[\s\S]*---/, '').trim(); | ||
@@ -6,0 +6,0 @@ |
{ | ||
"name": "pwomp-util", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Utilities for Pwomp plugins", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6905
16
114