<commit_before>#!/usr/bin/env/ node

const theo = require('theo');
const path = require('path');
const fs = require('fs-extra');

theo.registerTransform('cedar-web', ['color/hex']);

// MIXIN FORMATTER
theo.registerFormat('mixin', result => {
  let mixins = [];

  result.get('props').map(prop => {
    let name = prop.get('name');
    let value = prop.get('value');
    let declarations = [];
    let mixin = '';

    value.map((value,key) => {
      declarations.push(`${key}: ${value};`);
    });

    mixin = `@mixin ${name}() {
  ${declarations.join('\n  ')}
}`;

    mixins.push(mixin);
  });

  return `${mixins.join('\n\n')}\n`;
});


// OUTPUT MIXINS
theo
  .convert({
    transform: {
      type: 'web',
      file: path.join(__dirname, '..', 'tokens/m_index.yml'),<commit_msg>refactor(theo): fix theo eslint errors<commit_after>#!/usr/bin/env/ node

const theo = require('theo');
const path = require('path');
const fs = require('fs-extra');

theo.registerTransform('cedar-web', ['color/hex']);

// MIXIN FORMATTER
theo.registerFormat('mixin', (result) => {
  const mixins = [];

  result.get('props').forEach((prop) => {
    const name = prop.get('name');
    const value = prop.get('value');
    const declarations = [];
    let mixin = '';

    value.forEach((val, key) => {
      declarations.push(`${key}: ${val};`);
    });

    mixin = `@mixin ${name}() {
  ${declarations.join('\n  ')}
}`;

    mixins.push(mixin);
  });

  return `${mixins.join('\n\n')}\n`;
});


// OUTPUT MIXINS
theo
  .convert({
    transform: {
      type: 'web',
      file: path.join(__dirname, '..', 'tokens/m_index.yml'),
{'fraction_non_alphanumeric': 0.23081683168316833, 'fraction_numerical': 0.0, 'mean_word_length': 3.2777777777777777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2702874', 'n_tokens_mistral': 597, 'n_tokens_neox': 590, 'n_words': 104}