module Granify module Controller class Minify < Controller::Base # Purpose: minify all JS files in the current directory, move them to a # min directory and rename them file.min.js @@folder = :min # We don't need to clean logs here def post_exec false end def all # future method Notify.warning("Method not implemented") end def js min_folder = Utils.mklocaldir(@@folder) files = Utils.get_files(:js) command = Command::Exec.new if files.size > 0 files.each do |file| command.minify(file, min_folder) end Notify.bubble("Minified #{files.size} files.", "Success") else Notify.warning("No JS files detected in this directory") end end def cs # future method Notify.warning("Method not implemented") end end end end