Sha256: 1c6a2b7c8b982fb2480345a34159de80941ca4ce0fd4c51940d4787d551768d7

Contents?: true

Size: 1003 Bytes

Versions: 3

Compression:

Stored size: 1003 Bytes

Contents

module Capucine
  class Watchr
    require 'compass-sass.rb'
    require 'coffeescript.rb'
    require 'incloudr.rb'

    def self.watch config_file = nil
      self.compile config_file

      if config_file
        Capucine.settings.get_config config_file
      else
        Capucine.settings.get_config
      end

      @config = Capucine.settings.config

      sass_proc = Capucine::CompassSass.proc_watch if @config['sass']
      coffeescript_proc = Capucine::Coffee.proc_watch if @config['coffeescript']

      sass_proc.join if sass_proc
      coffeescript_proc.join if coffeescript_proc
    end

    def self.compile config_file = nil
      if config_file
        Capucine.settings.get_config config_file
      else
        Capucine.settings.get_config
      end

      @config = Capucine.settings.config

      Capucine::CompassSass.run_once if @config['sass']
      Capucine::Coffee.run_once if @config['coffeescript']
      Capucine::Incloudr.run_once if @config['incloudr']
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capucine-0.1.7 lib/watch.rb
capucine-0.1.6 lib/watch.rb
capucine-0.1.5 lib/watch.rb