mirror of
https://github.com/jgthms/bulma
synced 2026-03-18 03:14:30 -07:00
Add unitless type
This commit is contained in:
@@ -4,6 +4,7 @@ const utils = require('./utils');
|
||||
const fs = require('fs');
|
||||
|
||||
let initial_variables = JSON.parse(fs.readFileSync(utils.files.initial_variables));
|
||||
let derived_variables = JSON.parse(fs.readFileSync(utils.files.derived_variables));
|
||||
|
||||
function plugin() {
|
||||
return (files, metalsmith, done) => {
|
||||
@@ -21,7 +22,13 @@ function plugin() {
|
||||
const variable = utils.parseLine(line);
|
||||
|
||||
if (variable != false) {
|
||||
variable.computed_value = utils.getInitialValue(variable.value, variable.type, initial_variables);
|
||||
const computed_data = utils.getComputedData(variable.name, variable.value, variable.type, initial_variables, derived_variables);
|
||||
|
||||
if (Object.keys(computed_data).length > 0) {
|
||||
variable.computed_type = computed_data.computed_type;
|
||||
variable.computed_value = computed_data.computed_value;
|
||||
}
|
||||
|
||||
variables.by_name[variable.name] = variable;
|
||||
variables.list.push(variable.name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user