<commit_before>'use babel'

import Path from 'path'
import Less from 'less'

export const minifier = false
export const compiler = true
export function process(contents, {rootDirectory, filePath, config, state}) {
  return Less.render(contents, Object.assign({}, config.less, {
    filename: Path.relative(rootDirectory, filePath),
    sourceMap: true,
    paths: [Path.dirname(filePath)]
  })).then(function(output) {
    output.imports.forEach(function(item) {
      state.imports.push(Path.join(rootDirectory, item))
    })
    return {
      contents: output.css,
      sourceMap: JSON.parse(output.map)
    }
  })
}<commit_msg>:bug: Fix a bug when empty files would trigger an error<commit_after>'use babel'

import Path from 'path'
import Less from 'less'

export const minifier = false
export const compiler = true
export function process(contents, {rootDirectory, filePath, config, state}) {
  return Less.render(contents, Object.assign({}, config.less, {
    filename: Path.relative(rootDirectory, filePath),
    sourceMap: true,
    paths: [Path.dirname(filePath)]
  })).then(function(output) {
    if (!output.map) {
      return null
    }

    output.imports.forEach(function(item) {
      state.imports.push(Path.join(rootDirectory, item))
    })
    return {
      contents: output.css,
      sourceMap: JSON.parse(output.map)
    }
  })
}
{'fraction_non_alphanumeric': 0.12703101920236337, 'fraction_numerical': 0.0, 'mean_word_length': 3.85663082437276, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7002920', 'n_tokens_mistral': 411, 'n_tokens_neox': 408, 'n_words': 104}