@maggioli-design-system/design-tokens
Version:
This is the Design Token library of Maggioli Design System, here you'll find all the visual data used around the libraries.
27 lines (26 loc) • 1.12 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.cssHexFormat = void 0;
const handlebars_1 = __importDefault(require("handlebars"));
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const package_json_1 = require("../../../package.json");
const helpers_1 = require("../helpers");
const templatePath = path_1.default.resolve(__dirname, './template.hbs');
const template = handlebars_1.default.compile(fs_1.default.readFileSync(templatePath).toString());
handlebars_1.default.registerHelper('ifEquals', helpers_1.ifEquals);
handlebars_1.default.registerHelper('leadZero', helpers_1.leadZero);
exports.cssHexFormat = {
name: 'css/vars',
formatter: ({ dictionary, platform }) => {
return template({
properties: dictionary.properties,
date: new Date().toUTCString(),
options: platform,
version: package_json_1.version,
});
},
};