Class: Allen::Preprocessors::Sass

Inherits:
Preprocessor show all
Defined in:
lib/allen/preprocessors.rb

Class Method Summary collapse

Methods inherited from Preprocessor

relative

Class Method Details

.build(input, output) ⇒ Object



49
50
51
# File 'lib/allen/preprocessors.rb', line 49

def self.build(input, output)
  sh "sass #{relative input}:#{relative output} --style expanded"
end

.compress(input, output) ⇒ Object



53
54
55
# File 'lib/allen/preprocessors.rb', line 53

def self.compress(input, output)
  sh "sass #{relative input}:#{relative output} --style compressed"
end

.watch(input, output) ⇒ Object



57
58
59
60
61
# File 'lib/allen/preprocessors.rb', line 57

def self.watch(input, output)
  input_path = relative(input).gsub(/\/\w+\.\w+$/,'')
  output_path = relative(output).gsub(/\/\w+\.\w+$/,'')
  sh "sass --watch #{input_path}:#{output_path} --style expanded"
end