Has anyone connected jshint with Middleman to automatically run all JavaScript files through jshint when middleman build
is run? There is a Ruby Gem called jshintrb. I have added the Gem to my Gemfile and installed it but I am unsure how to call it from my config.rb file.
If I had a Rakefile, I could add the following:
require 'jshintrb/jshinttask'
Jshintrb::JshintTask.new :jshint do |t|
t.pattern = 'source/assets/**/*.js'
t.exclude_pattern = 'source/assets/{vendor/**/*,require}.js'
t.options = JSON.parse(IO.read('.jshintrc'))
end
But is there a way to call this from Middleman’s config.rb file?