module Buildr::ScssLint
Provides the scss_lint:html
and scss_lint:xml
tasks. Require explicitly using require "buildr/scss_lint"
.
Public Class Methods
scss_lint(output_file, source_paths, options = {})
click to toggle source
# File addon/buildr/scss_lint.rb, line 22 def scss_lint(output_file, source_paths, options = {}) args = [] if ENV['BUNDLE_GEMFILE'] args << 'bundle' args << 'exec' end args << 'scss-lint' if options[:configuration_file] args << '--config' args << options[:configuration_file] end if options[:file_excludes] args << '--exclude' args << options[:file_excludes].join(',') end if options[:formatter] args << '--format' args << options[:formatter] end if options[:linter_includes] && !options[:linter_includes].empty? args << '--include-linter' args << options[:linter_includes].join(',') end if options[:linter_excludes] && !options[:linter_excludes].empty? args << '--exclude-linter' args << options[:linter_excludes].join(',') end source_paths.each do |source_path| args << source_path end mkdir_p File.dirname(output_file) File.open(output_file, 'wb') do |f| f.write `#{args.join(' ')}` end end