Skip to content

Commit

Permalink
style: resolve rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Allison Strandberg committed Jan 5, 2021
1 parent 9cdafe4 commit a70afba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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'
18 changes: 11 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a70afba

Please sign in to comment.