<commit_before>class InesitaCLI < Thor
  include Thor::Actions

  check_unknown_options!

  namespace :build

  desc "build [OPTIONS]", "Build Inesita app"

  method_option :force,
                aliases: ['-f'],
                default: false,
                desc: 'force overwrite'

  method_option :destination,
                aliases: ['-d', '-dir'],
                default: 'public',
                desc: 'build destination directory'

  def build
    build_dir = options[:destination]

    assets = Inesita::Server.assets
    Inesita::Server.set_global_vars(assets, false)

    index = assets['index.html']
    javascript = assets['application.js']
    stylesheet = assets['application.css']

    empty_directory build_dir, force: options[:force]
    create_file File.join(build_dir, 'index.html'),      index.source,      force: options[:force]
    create_file File.join(build_dir, 'application.js'),  javascript.source, force: options[:force]
    create_file File.join(build_dir, 'application.css'), stylesheet.source, force: options[:force]
  end
end<commit_msg>fix stylesheet build<commit_after>class InesitaCLI < Thor
  include Thor::Actions

  check_unknown_options!

  namespace :build

  desc "build [OPTIONS]", "Build Inesita app"

  method_option :force,
                aliases: ['-f'],
                default: false,
                desc: 'force overwrite'

  method_option :destination,
                aliases: ['-d', '-dir'],
                default: 'public',
                desc: 'build destination directory'

  def build
    build_dir = options[:destination]

    assets = Inesita::Server.assets
    Inesita::Server.set_global_vars(assets, false)

    index = assets['index.html']
    javascript = assets['application.js']
    stylesheet = assets['stylesheet.css']

    empty_directory build_dir, force: options[:force]
    create_file File.join(build_dir, 'index.html'),      index.source,      force: options[:force]
    create_file File.join(build_dir, 'application.js'),  javascript.source, force: options[:force]
    create_file File.join(build_dir, 'stylesheet.css'), stylesheet.source, force: options[:force]
  end
end
{'fraction_non_alphanumeric': 0.1186833565136764, 'fraction_numerical': 0.0, 'mean_word_length': 3.033644859813084, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4519510', 'n_tokens_mistral': 644, 'n_tokens_neox': 601, 'n_words': 145}