Sha256: c078ff5fee7f79dff8e72865db71d603b73030fc4a885431a6026c4abf77d634

Contents?: true

Size: 1015 Bytes

Versions: 18

Compression:

Stored size: 1015 Bytes

Contents

module Picky

  # Rake tasks for Picky clients.
  #
  module Tasks

    # Copies the latest javascripts into the default javascript folder.
    #
    # Example:
    #   # Use as follows in your Rakefile.
    #   #
    #   Picky::Tasks::Javascripts.new                       # Copies the files into the javascripts folder (by default).
    #   Picky::Tasks::Javascripts.new('public/javascripts') # Copies the files into the public/javascripts folder.
    #
    class Javascripts

      define_method :initialize do |target = 'javascripts'|
        desc "Copy the latest client javascripts to '#{target}' (Give target dir to Picky::Tasks::Javascripts.new to change)."
        task :javascripts do
          target_dir = File.expand_path target, Dir.pwd
          source_dir = File.expand_path '../../../../javascripts/*.min.js', __FILE__

          puts "Copying javascript files from picky-client gem to target dir #{target_dir}"
          `cp -i #{source_dir} #{target_dir}`
        end
      end

    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
picky-client-2.7.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.6.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.5.2 lib/picky-client/tasks/javascripts.rb
picky-client-2.5.1 lib/picky-client/tasks/javascripts.rb
picky-client-2.5.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.4.3 lib/picky-client/tasks/javascripts.rb
picky-client-2.4.2 lib/picky-client/tasks/javascripts.rb
picky-client-2.4.1 lib/picky-client/tasks/javascripts.rb
picky-client-2.4.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.3.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.2.1 lib/picky-client/tasks/javascripts.rb
picky-client-2.2.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.1.2 lib/picky-client/tasks/javascripts.rb
picky-client-2.1.1 lib/picky-client/tasks/javascripts.rb
picky-client-2.1.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.0.0 lib/picky-client/tasks/javascripts.rb
picky-client-2.0.0.pre3 lib/picky-client/tasks/javascripts.rb
picky-client-2.0.0.pre2 lib/picky-client/tasks/javascripts.rb