From a70afba13df99a6a3533c89fcd443694ca85a365 Mon Sep 17 00:00:00 2001 From: Allison Strandberg Date: Tue, 5 Jan 2021 14:20:29 -0500 Subject: [PATCH] style: resolve rubocop issues --- Gemfile | 6 ++++-- Rakefile | 18 +++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index fbf3ab1..a661695 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,8 @@ +# frozen_string_literal: true + source 'https://rubygems.org' -gem 'rake' gem 'coffee-script' -gem 'uglifier' +gem 'rake' gem 'sass' +gem 'uglifier' diff --git a/Rakefile b/Rakefile index f5d8a2a..f64fd12 100644 --- a/Rakefile +++ b/Rakefile @@ -1,25 +1,29 @@ +# frozen_string_literal: true + require 'bundler' Bundler.setup require 'uglifier' -desc "Compile" +desc 'Compile' task :compile do - Dir.glob("**/*.coffee").each do |file| + Dir.glob('**/*.coffee').each do |file| system("bundle exec coffee -c #{file}") end - Dir.glob("**/*.scss").each do |file| - css_name = file.sub(/\.scss/, ".css") + Dir.glob('**/*.scss').each do |file| + css_name = file.sub(/\.scss/, '.css') system("bundle exec sass --scss #{file} > #{css_name}") end - File.open('chardinjs.min.js', 'w') { |f| f.write Uglifier.compile(File.read('chardinjs.js')) } + File.open('chardinjs.min.js', 'w') do |f| + f.write Uglifier.compile(File.read('chardinjs.js')) + end end -desc "Watch" +desc 'Watch' task :watch do - files = Dir.glob("**/*.coffee").join(' ') + files = Dir.glob('**/*.coffee').join(' ') system("bundle exec coffee -wc #{files}") end