Sha256: 166456d708e44368fa03eb4257fef18489354e58fc2b31f215d87ad97a29b133

Contents?: true

Size: 525 Bytes

Versions: 9

Compression:

Stored size: 525 Bytes

Contents

#!/usr/bin/env ruby
require 'sprockets'

app_path = File.expand_path('../..',  __FILE__)

source_path      = (app_path + "/vendor/assets/javascripts/gmaps/")
destination_path = (app_path + "/js_compilation/")

%w(google).each do |name|
  #main source file:
  main_source_file_name = "#{name}.coffee"
  #desired output file
  compiled_file_path = (destination_path + "gmaps_#{name}.js")

  env = Sprockets::Environment.new
  env.append_path source_path

  open(compiled_file_path, "w").write( env[main_source_file_name] )
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gmaps4rails-2.1.2 script/compile_coffee_files.rb
gmaps4rails-2.1.1 script/compile_coffee_files.rb
gmaps4rails-2.1.0 script/compile_coffee_files.rb
gmaps4rails-2.0.5 script/compile_coffee_files.rb
gmaps4rails-2.0.4 script/compile_coffee_files.rb
gmaps4rails-2.0.3 script/compile_coffee_files.rb
gmaps4rails-2.0.2 script/compile_coffee_files.rb
gmaps4rails-2.0.1 script/compile_coffee_files.rb
gmaps4rails-2.0.0 script/compile_coffee_files.rb