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



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

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

.compress(input, output) ⇒ Object



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

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

.watch(input, output) ⇒ Object



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

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