mirror of
https://github.com/jgthms/bulma
synced 2026-03-16 10:34:29 -07:00
Add initial variables output
This commit is contained in:
23
docs/scripts/read-derived-variables.js
Normal file
23
docs/scripts/read-derived-variables.js
Normal file
@@ -0,0 +1,23 @@
|
||||
module.exports = plugin;
|
||||
|
||||
var utils = require('./utils');
|
||||
|
||||
function plugin() {
|
||||
return (files, metalsmith, done) => {
|
||||
setImmediate(done);
|
||||
|
||||
Object.keys(files).forEach(file_path => {
|
||||
const {file_name, lines} = utils.getLines(files, file_path);
|
||||
|
||||
lines.forEach(line => {
|
||||
const variable = utils.parseLine(line);
|
||||
|
||||
if (variable != false) {
|
||||
console.log('variable', variable);
|
||||
}
|
||||
});
|
||||
|
||||
metalsmith.variables = variables;
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user