Sha256: c55f95c5e204d41eb4a4ab72b96dc8b15dda16ea0f53e0903e53b8d57d824e71
Contents?: true
Size: 830 Bytes
Versions: 3
Compression:
Stored size: 830 Bytes
Contents
require 'rails' module Backbonejs module Generators class UninstallGenerator < ::Rails::Generators::Base desc "This generator uninstalls backbone.js, underscore.js, json2.js, and (optionally) icanhaz.js" class_option :keep, { :type => :array, :desc => 'Do not remove specified libraries', :banner => 'library another-library' } def remove_libraries ['backbone', 'underscore', 'json2', 'icanhaz'].each do |lib| unless [*options[:keep]].include?(lib) # Remove full and minified version of library file = "public/javascripts/#{lib}.js" remove_file file if File.exists?(file) end end end def remove_json_false remove_file 'config/initializers/backbone.rb' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems