<commit_before>;; Copyright © 2014 JUXT LTD.
(ns modular.less.compilation
  (:require [com.stuartsierra.component :refer (Lifecycle)]
            [schema.core :as s]
            [lein-less.less :refer (run-compiler)]))

(defrecord LessCompilation [engine less-config]
  Lifecycle
  (start [this]
    (run-compiler engine less-config))
  (stop [this]
    this))

(defn new-less-compilation [& {:as opts}]
  (->> opts
       (merge {:engine :javascript})
       (s/validate {:engine (s/enum :javascript :rhino :nashorn)
                    :less-config {:project-root s/Str
                                  :source-paths [s/Str]
                                  :target-path s/Str}})
       map->LessCompilation))<commit_msg>Update compilation.clj<commit_after>;; Copyright © 2014 JUXT LTD.
(ns modular.less.compilation
  (:require [com.stuartsierra.component :refer (Lifecycle)]
            [schema.core :as s]
            [lein-less.less :refer (run-compiler)]))

(defrecord LessCompilation [engine less-config]
  Lifecycle
  (start [this]
    (run-compiler engine less-config))
  (stop [this]
    this))

(defn new-less-compilation [& {:as opts}]
  (->> opts
       (merge {:engine :javascript})
       (s/validate {:engine (s/enum :javascript :rhino :nashorn)
                    :less-config {:project-root s/Str
                                  :source-path s/Str
                                  :target-path s/Str}})
       map->LessCompilation))
{'fraction_non_alphanumeric': 0.13667582417582416, 'fraction_numerical': 0.005494505494505495, 'mean_word_length': 2.119914346895075, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2264673', 'n_tokens_mistral': 467, 'n_tokens_neox': 440, 'n_words': 106}