<commit_before>module Jekyll
  module Commands
    class Build < Command

      class << self

        # Create the Mercenary command for the Jekyll CLI for this Command
        def init_with_program(prog)
          prog.command(:build) do |c|
            c.syntax      'build [options]'
            c.description 'Build your site'
            c.alias :b

            add_build_options(c)

            c.action do |args, options|
              options["serving"] = false
              Jekyll::Commands::Build.process(options)
            end
          end
        end

        # Build your jekyll site
        # Continuously watch if `watch` is set to true in the config.
        def process(options)
          Jekyll.logger.log_level = :error if options['quiet']

          options = configuration_from_options(options)
          site = Jekyll::Site.new(options)

          if options.fetch('skip_initial_build', false)
            Jekyll.logger.warn "Build Warning:", "Skipping the initial build. This may result in an out-of-date site."
          else
            build(site, options)
          end

          if options.fetch('watch', false)
            watch(site, options)
          else
            Jekyll.logger.info "Auto-regeneration:", "disabled. Use --watch to enable."
          end
        end

        # Build your Jekyll site.
        #
        # site - the Jekyll::Site instance to build
        # options - A Hash of options passed to the command
        #
        # Returns nothing.
        def build(site, options)
          t = Time.now
          source      = options['source']
          destination = options['destination']
          full_build  = options['full_rebuild']
          Jekyll.logger.info "Source:", source
          Jekyll.logger.info "Destination:", destination
          Jekyll.logger.info "Incremental build:", (full_build ? "disabled" : "enabled")
          Jekyll.logger.info "Generating..."
          process_site(site)
          Jekyll.logger.info "", "done in #{(Time.now - t).round(2)} seconds."
        end

        # Private: Watch for file changes and rebuild the site.
        #
        # site - A Jekyll::Site instance
        # options - A Hash of options passed to the command<commit_msg>Use 3 places to the right of the decimal place instead of 2.<commit_after>module Jekyll
  module Commands
    class Build < Command

      class << self

        # Create the Mercenary command for the Jekyll CLI for this Command
        def init_with_program(prog)
          prog.command(:build) do |c|
            c.syntax      'build [options]'
            c.description 'Build your site'
            c.alias :b

            add_build_options(c)

            c.action do |args, options|
              options["serving"] = false
              Jekyll::Commands::Build.process(options)
            end
          end
        end

        # Build your jekyll site
        # Continuously watch if `watch` is set to true in the config.
        def process(options)
          Jekyll.logger.log_level = :error if options['quiet']

          options = configuration_from_options(options)
          site = Jekyll::Site.new(options)

          if options.fetch('skip_initial_build', false)
            Jekyll.logger.warn "Build Warning:", "Skipping the initial build. This may result in an out-of-date site."
          else
            build(site, options)
          end

          if options.fetch('watch', false)
            watch(site, options)
          else
            Jekyll.logger.info "Auto-regeneration:", "disabled. Use --watch to enable."
          end
        end

        # Build your Jekyll site.
        #
        # site - the Jekyll::Site instance to build
        # options - A Hash of options passed to the command
        #
        # Returns nothing.
        def build(site, options)
          t = Time.now
          source      = options['source']
          destination = options['destination']
          full_build  = options['full_rebuild']
          Jekyll.logger.info "Source:", source
          Jekyll.logger.info "Destination:", destination
          Jekyll.logger.info "Incremental build:", (full_build ? "disabled" : "enabled")
          Jekyll.logger.info "Generating..."
          process_site(site)
          Jekyll.logger.info "", "done in #{(Time.now - t).round(3)} seconds."
        end

        # Private: Watch for file changes and rebuild the site.
        #
        # site - A Jekyll::Site instance
        # options - A Hash of options passed to the command
{'fraction_non_alphanumeric': 0.09078860172299535, 'fraction_numerical': 0.0008835873647006848, 'mean_word_length': 1.7881773399014778, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1978281', 'n_tokens_mistral': 1223, 'n_tokens_neox': 1180, 'n_words': 375}