<commit_before>_ = require 'lodash'

module.exports = (body, layout, content, options, scripts = [], preloadComponents = []) ->
  clumperEnabled = true

  clumperScript = if clumperEnabled
    "<script src='/clumper.js?include=true&files=#{scripts.join ','}'></script><script>var requirejs = require;</script>"
  else
    ''

  base = "<base href='/'>"
  dom = "<div id='content'>#{body}</div>"

  scriptTags = if clumperEnabled
    ''
  else
    scripts.unshift '/js/require.js'
    _ scripts
      .map (script) ->
        "<script src='#{script}'></script>"
      .value()<commit_msg>don't use clumper if NODE_ENV=dev<commit_after>_ = require 'lodash'

module.exports = (body, layout, content, options, scripts = [], preloadComponents = []) ->
  clumperEnabled = process.env.NODE_ENV != 'dev'

  clumperScript = if clumperEnabled
    "<script src='/clumper.js?include=true&files=#{scripts.join ','}'></script><script>var requirejs = require;</script>"
  else
    ''

  base = "<base href='/'>"
  dom = "<div id='content'>#{body}</div>"

  scriptTags = if clumperEnabled
    ''
  else
    scripts.unshift '/js/require.js'
    _ scripts
      .map (script) ->
        "<script src='#{script}'></script>"
      .value()
{'fraction_non_alphanumeric': 0.18703855619360132, 'fraction_numerical': 0.0, 'mean_word_length': 3.5353159851301115, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, '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': '4987218', 'n_tokens_mistral': 397, 'n_tokens_neox': 397, 'n_words': 82}