Class: RugularVendorAndBowerComponents

Inherits:
Object
  • Object
show all
Defined in:
lib/rugular/tasks/server/guards/rugular_vendor_and_bower_components.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRugularVendorAndBowerComponents

Returns a new instance of RugularVendorAndBowerComponents.



9
# File 'lib/rugular/tasks/server/guards/rugular_vendor_and_bower_components.rb', line 9

def initialize; end

Class Method Details

.compileObject



5
6
7
# File 'lib/rugular/tasks/server/guards/rugular_vendor_and_bower_components.rb', line 5

def self.compile
  new.compile
end

Instance Method Details

#compileObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/rugular/tasks/server/guards/rugular_vendor_and_bower_components.rb', line 11

def compile
  File.open('.tmp/vendor.css', 'w') do |file|
    file.write bower_css
  end
  File.open('.tmp/vendor.js', 'w') do |file|
    file.write(Uglifier.compile(bower_and_vendor_javascript))
  end

  message = 'Successfully created vendor asset files'
rescue StandardError => error
  handle_error_in_guard(error)
end