<commit_before>require "capistrano_nrel_ext/recipes/npm"

Capistrano::Configuration.instance(true).load do
  #
  # Varabiles
  #
  set :bower_apps, []

  #
  # Hooks
  #
  after "deploy:npm:install", "deploy:bower:install"

  #
  # Tasks
  #
  namespace :deploy do
    namespace :bower do
      send :desc, <<-DESC
        Install bower dependencies.
      DESC
      task :install, :except => { :no_release => true } do
        # Gather all the paths for bower applications.
        bower_paths = bower_apps.collect do |application_path|
          File.join(latest_release, application_path)
        end

        bower_paths.each do |full_application_path|
          run "cd #{full_application_path} && ./node_modules/.bin/bower install"
        end
      end
    end
  end
end<commit_msg>Tweak bower to work better under Bower 1.3 and allow customizations.<commit_after>require "capistrano_nrel_ext/recipes/npm"

Capistrano::Configuration.instance(true).load do
  #
  # Varabiles
  #
  set :bower_apps, []
  _cset :bower_cmd, "./node_modules/.bin/bower"
  _cset :bower_flags, ""

  #
  # Hooks
  #
  after "deploy:npm:install", "deploy:bower:install"

  #
  # Tasks
  #
  namespace :deploy do
    namespace :bower do
      send :desc, <<-DESC
        Install bower dependencies.
      DESC
      task :install, :except => { :no_release => true } do
        # Gather all the paths for bower applications.
        bower_paths = bower_apps.collect do |application_path|
          File.join(latest_release, application_path)
        end

        bower_paths.each do |full_application_path|
          run "cd #{full_application_path} && #{bower_cmd} install --config.interactive=false #{bower_flags}"
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10132412204951065, 'fraction_numerical': 0.0011514104778353484, 'mean_word_length': 2.7296137339055795, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7473903', 'n_tokens_mistral': 584, 'n_tokens_neox': 564, 'n_words': 132}