Sha256: a3888fc296900eae245d8db6a042f13b1ac4e2e32c9c24935da55d4750f327d4

Contents?: true

Size: 862 Bytes

Versions: 8

Compression:

Stored size: 862 Bytes

Contents

require 'guard'
require 'guard/guard'

module Guard
  class ForgeFunctions < ::Guard::Guard
    def initialize(watchers=[], options={})
      super
    end

    def start
      UI.info "Copying functions over"
      ::Forge::Guard.builder.copy_functions
      ::Forge::Guard.builder.copy_includes
    end

    def run_all
      UI.info "Rebuilding all functions"
      ::Forge::Guard.builder.clean_functions
      ::Forge::Guard.builder.copy_functions
      ::Forge::Guard.builder.clean_includes
      ::Forge::Guard.builder.copy_includes
    end

    # Called on file(s) modifications
    def run_on_change(paths)
      UI.info "Functions have changed, copying over"
      ::Forge::Guard.builder.clean_functions
      ::Forge::Guard.builder.copy_functions
      ::Forge::Guard.builder.clean_includes
      ::Forge::Guard.builder.copy_includes
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
forge-0.5.0 lib/guard/forge/functions.rb
forge-0.4.4 lib/guard/forge/functions.rb
forge-0.4.3 lib/guard/forge/functions.rb
forge-0.4.2 lib/guard/forge/functions.rb
forge-0.4.1 lib/guard/forge/functions.rb
forge-0.4.0 lib/guard/forge/functions.rb
forge-0.3.0 lib/guard/forge/functions.rb
forge-0.2.0 lib/guard/forge/functions.rb