Update variables include template

This commit is contained in:
Jeremy Thomas
2018-06-16 20:47:52 +01:00
parent ace4c58fc7
commit 1ff1edcf53
51 changed files with 2420 additions and 1498 deletions

View File

@@ -3,16 +3,17 @@ module.exports = plugin;
const utils = require('./utils');
function plugin() {
let variables = {
by_name: {},
list: [],
};
return (files, metalsmith, done) => {
setImmediate(done);
Object.keys(files).forEach(file_path => {
const {file_name, lines} = utils.getLines(files, file_path);
let variables = {
by_name: {},
list: [],
file_path,
};
lines.forEach(line => {
const variable = utils.parseLine(line);