<commit_before># coffee-script tasks
require 'coffee-script'

namespace :js do
  desc "compile coffee-scripts from ./src to ./public/js"
  task :compile do
    source = "#{File.dirname(__FILE__)}/../src/"
    javascripts = "#{File.dirname(__FILE__)}/../public/js/"
    
    Dir.foreach(source) do |cf|
      unless cf == '.' || cf == '..' 
        js = CoffeeScript.compile File.read("#{source}#{cf}") 
        open "#{javascripts}#{cf.gsub('.coffee', '.js')}", 'w' do |f|
          f.puts js
        end 
      end 
    end
  end
end<commit_msg>fixing coffee tasks not not die if no coffee<commit_after># coffee-script tasks
begin
  require 'coffee-script'

  namespace :js do
    desc "compile coffee-scripts from ./src to ./public/js"
    task :compile do
      source = "#{File.dirname(__FILE__)}/../src/"
      javascripts = "#{File.dirname(__FILE__)}/../public/js/"

      Dir.foreach(source) do |cf|
        unless cf == '.' || cf == '..' 
          js = CoffeeScript.compile File.read("#{source}#{cf}") 
          open "#{javascripts}#{cf.gsub('.coffee', '.js')}", 'w' do |f|
            f.puts js
          end 
        end 
      end
    end
  end
rescue LoadError
  warn "#$! -- coffee-script tasks not loaded."
end
{'fraction_non_alphanumeric': 0.1737357259380098, 'fraction_numerical': 0.0, 'mean_word_length': 2.2807486631016043, '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': '6914329', 'n_tokens_mistral': 413, 'n_tokens_neox': 402, 'n_words': 104}